Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: ui/views/controls/webview/webview.cc

Issue 10080019: Revert 132290 - Remove a dcheck I just added since I apparently don't understand the various circum… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/controls/webview/webview.h" 5 #include "ui/views/controls/webview/webview.h"
6 6
7 #include "content/public/browser/browser_context.h" 7 #include "content/public/browser/browser_context.h"
8 #include "content/public/browser/notification_details.h" 8 #include "content/public/browser/notification_details.h"
9 #include "content/public/browser/notification_registrar.h" 9 #include "content/public/browser/notification_registrar.h"
10 #include "content/public/browser/notification_source.h" 10 #include "content/public/browser/notification_source.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 wc_owner_.reset(); 53 wc_owner_.reset();
54 web_contents_ = web_contents; 54 web_contents_ = web_contents;
55 AttachWebContents(); 55 AttachWebContents();
56 } 56 }
57 57
58 void WebView::SetFastResize(bool fast_resize) { 58 void WebView::SetFastResize(bool fast_resize) {
59 wcv_holder_->set_fast_resize(fast_resize); 59 wcv_holder_->set_fast_resize(fast_resize);
60 } 60 }
61 61
62 void WebView::OnWebContentsFocused(content::WebContents* web_contents) { 62 void WebView::OnWebContentsFocused(content::WebContents* web_contents) {
63 DCHECK(web_contents == web_contents_);
63 FocusManager* focus_manager = GetFocusManager(); 64 FocusManager* focus_manager = GetFocusManager();
64 if (focus_manager) 65 if (focus_manager)
65 focus_manager->SetFocusedView(this); 66 focus_manager->SetFocusedView(this);
66 } 67 }
67 68
68 //////////////////////////////////////////////////////////////////////////////// 69 ////////////////////////////////////////////////////////////////////////////////
69 // WebView, View overrides: 70 // WebView, View overrides:
70 71
71 void WebView::OnBoundsChanged(const gfx::Rect& previous_bounds) { 72 void WebView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
72 wcv_holder_->SetSize(bounds().size()); 73 wcv_holder_->SetSize(bounds().size());
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 if (GetFocusManager()->GetFocusedView() == this) 192 if (GetFocusManager()->GetFocusedView() == this)
192 web_contents_->Focus(); 193 web_contents_->Focus();
193 } 194 }
194 195
195 void WebView::WebContentsDestroyed(content::WebContents* web_contents) { 196 void WebView::WebContentsDestroyed(content::WebContents* web_contents) {
196 DCHECK(web_contents == web_contents_); 197 DCHECK(web_contents == web_contents_);
197 SetWebContents(NULL); 198 SetWebContents(NULL);
198 } 199 }
199 200
200 } // namespace views 201 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698