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

Side by Side Diff: ui/views/controls/native/native_view_host.cc

Issue 339663003: Revert of Implement NativeViewHostAura::InstallClip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « ui/aura/client/aura_constants.cc ('k') | ui/views/controls/native/native_view_host_aura.h » ('j') | 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/native/native_view_host.h" 5 #include "ui/views/controls/native/native_view_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/base/cursor/cursor.h" 8 #include "ui/base/cursor/cursor.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/views/accessibility/native_view_accessibility.h" 10 #include "ui/views/accessibility/native_view_accessibility.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 void NativeViewHost::Attach(gfx::NativeView native_view) { 33 void NativeViewHost::Attach(gfx::NativeView native_view) {
34 DCHECK(native_view); 34 DCHECK(native_view);
35 DCHECK(!native_view_); 35 DCHECK(!native_view_);
36 native_view_ = native_view; 36 native_view_ = native_view;
37 // If set_focus_view() has not been invoked, this view is the one that should 37 // If set_focus_view() has not been invoked, this view is the one that should
38 // be seen as focused when the native view receives focus. 38 // be seen as focused when the native view receives focus.
39 if (!focus_view_) 39 if (!focus_view_)
40 focus_view_ = this; 40 focus_view_ = this;
41 native_wrapper_->AttachNativeView(); 41 native_wrapper_->NativeViewWillAttach();
42 Widget::ReparentNativeView(native_view_, GetWidget()->GetNativeView());
42 Layout(); 43 Layout();
43 44
44 Widget* widget = Widget::GetWidgetForNativeView(native_view); 45 Widget* widget = Widget::GetWidgetForNativeView(native_view);
45 if (widget) 46 if (widget)
46 widget->SetNativeWindowProperty(kWidgetNativeViewHostKey, this); 47 widget->SetNativeWindowProperty(kWidgetNativeViewHostKey, this);
47 } 48 }
48 49
49 void NativeViewHost::Detach() { 50 void NativeViewHost::Detach() {
50 Detach(false); 51 Detach(false);
51 } 52 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 Widget::Widgets widgets; 215 Widget::Widgets widgets;
215 Widget::GetAllChildWidgets(native_view(), &widgets); 216 Widget::GetAllChildWidgets(native_view(), &widgets);
216 for (Widget::Widgets::iterator i = widgets.begin(); i != widgets.end(); ++i) { 217 for (Widget::Widgets::iterator i = widgets.begin(); i != widgets.end(); ++i) {
217 focus_manager->ViewRemoved((*i)->GetRootView()); 218 focus_manager->ViewRemoved((*i)->GetRootView());
218 if (!focus_manager->GetFocusedView()) 219 if (!focus_manager->GetFocusedView())
219 return; 220 return;
220 } 221 }
221 } 222 }
222 223
223 } // namespace views 224 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/client/aura_constants.cc ('k') | ui/views/controls/native/native_view_host_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698