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

Side by Side Diff: chrome/browser/ui/views/dom_view.cc

Issue 8375018: aura: Move the keyboard correctly in the proper container. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 | chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/views/dom_view.h" 5 #include "chrome/browser/ui/views/dom_view.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/renderer_preferences_util.h" 8 #include "chrome/browser/renderer_preferences_util.h"
9 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" 9 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h"
10 #include "content/browser/tab_contents/tab_contents.h" 10 #include "content/browser/tab_contents/tab_contents.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Attach the native_view when this is added to Widget if 73 // Attach the native_view when this is added to Widget if
74 // the native view has not been attached yet and tab_contents_ exists. 74 // the native view has not been attached yet and tab_contents_ exists.
75 views::NativeViewHost::ViewHierarchyChanged(is_add, parent, child); 75 views::NativeViewHost::ViewHierarchyChanged(is_add, parent, child);
76 if (is_add && GetWidget() && !native_view() && dom_contents_.get()) 76 if (is_add && GetWidget() && !native_view() && dom_contents_.get())
77 AttachTabContents(); 77 AttachTabContents();
78 else if (!is_add && child == this && native_view()) 78 else if (!is_add && child == this && native_view())
79 Detach(); 79 Detach();
80 } 80 }
81 81
82 void DOMView::AttachTabContents() { 82 void DOMView::AttachTabContents() {
83 #if !defined(USE_AURA) 83 #if defined(TOUCH_UI) || !defined(USE_AURA)
84 if (views::Widget::IsPureViews()) { 84 if (views::Widget::IsPureViews()) {
85 TabContentsViewViews* widget = static_cast<TabContentsViewViews*>( 85 TabContentsViewViews* widget = static_cast<TabContentsViewViews*>(
86 dom_contents_->tab_contents()->view()); 86 dom_contents_->tab_contents()->view());
87 views::NativeWidgetViews* nwv = 87 views::NativeWidgetViews* nwv =
88 static_cast<views::NativeWidgetViews*>(widget->native_widget()); 88 static_cast<views::NativeWidgetViews*>(widget->native_widget());
89 AttachToView(nwv->GetView()); 89 AttachToView(nwv->GetView());
90 } else { 90 } else {
91 #endif 91 #endif
92 Attach(dom_contents_->tab_contents()->GetNativeView()); 92 Attach(dom_contents_->tab_contents()->GetNativeView());
93 #if !defined(USE_AURA) 93 #if defined(TOUCH_UI) || !defined(USE_AURA)
94 } 94 }
95 #endif 95 #endif
96 } 96 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698