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

Side by Side Diff: chrome/browser/extensions/extension_view.cc

Issue 115912: Fix unit test bustage by making sure ExtensionView::ViewHierarchyChanged call... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 6 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 "chrome/browser/extensions/extension_view.h" 5 #include "chrome/browser/extensions/extension_view.h"
6 6
7 #include "chrome/browser/extensions/extension_host.h" 7 #include "chrome/browser/extensions/extension_host.h"
8 #include "chrome/browser/renderer_host/render_view_host.h" 8 #include "chrome/browser/renderer_host/render_view_host.h"
9 #include "chrome/browser/renderer_host/render_widget_host_view.h" 9 #include "chrome/browser/renderer_host/render_widget_host_view.h"
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 if (!IsVisible()) { 76 if (!IsVisible()) {
77 pending_preferred_width_ = pref_width; 77 pending_preferred_width_ = pref_width;
78 } else if (pref_width > 0 && pref_width != GetPreferredSize().width()) { 78 } else if (pref_width > 0 && pref_width != GetPreferredSize().width()) {
79 SetPreferredSize(gfx::Size(pref_width, height())); 79 SetPreferredSize(gfx::Size(pref_width, height()));
80 } 80 }
81 } 81 }
82 82
83 void ExtensionView::ViewHierarchyChanged(bool is_add, 83 void ExtensionView::ViewHierarchyChanged(bool is_add,
84 views::View *parent, 84 views::View *parent,
85 views::View *child) { 85 views::View *child) {
86 NativeViewHost::ViewHierarchyChanged(is_add, parent, child);
86 if (is_add && GetWidget() && !initialized_) { 87 if (is_add && GetWidget() && !initialized_) {
87 initialized_ = true; 88 initialized_ = true;
88 89
89 RenderWidgetHostView* view = RenderWidgetHostView::CreateViewForWidget( 90 RenderWidgetHostView* view = RenderWidgetHostView::CreateViewForWidget(
90 render_view_host()); 91 render_view_host());
91 92
92 // TODO(mpcomplete): RWHV needs a cross-platform Init function. 93 // TODO(mpcomplete): RWHV needs a cross-platform Init function.
93 #if defined(OS_WIN) 94 #if defined(OS_WIN)
94 // Create the HWND. Note: 95 // Create the HWND. Note:
95 // RenderWidgetHostHWND supports windowed plugins, but if we ever also 96 // RenderWidgetHostHWND supports windowed plugins, but if we ever also
(...skipping 21 matching lines...) Expand all
117 118
118 void ExtensionView::HandleMouseEvent() { 119 void ExtensionView::HandleMouseEvent() {
119 if (container_) 120 if (container_)
120 container_->OnExtensionMouseEvent(this); 121 container_->OnExtensionMouseEvent(this);
121 } 122 }
122 123
123 void ExtensionView::HandleMouseLeave() { 124 void ExtensionView::HandleMouseLeave() {
124 if (container_) 125 if (container_)
125 container_->OnExtensionMouseLeave(this); 126 container_->OnExtensionMouseLeave(this);
126 } 127 }
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