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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 15114002: Reorder the NativeViews attached to a view via kViewHostKey according to the position of the view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/activation_client.h" 10 #include "ui/aura/client/activation_client.h"
(...skipping 12 matching lines...) Expand all
23 #include "ui/base/dragdrop/os_exchange_data.h" 23 #include "ui/base/dragdrop/os_exchange_data.h"
24 #include "ui/base/events/event.h" 24 #include "ui/base/events/event.h"
25 #include "ui/base/ui_base_types.h" 25 #include "ui/base/ui_base_types.h"
26 #include "ui/compositor/layer.h" 26 #include "ui/compositor/layer.h"
27 #include "ui/gfx/canvas.h" 27 #include "ui/gfx/canvas.h"
28 #include "ui/gfx/font.h" 28 #include "ui/gfx/font.h"
29 #include "ui/gfx/screen.h" 29 #include "ui/gfx/screen.h"
30 #include "ui/native_theme/native_theme_aura.h" 30 #include "ui/native_theme/native_theme_aura.h"
31 #include "ui/views/drag_utils.h" 31 #include "ui/views/drag_utils.h"
32 #include "ui/views/ime/input_method_bridge.h" 32 #include "ui/views/ime/input_method_bridge.h"
33 #include "ui/views/view_constants_aura.h"
33 #include "ui/views/views_delegate.h" 34 #include "ui/views/views_delegate.h"
34 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 35 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
35 #include "ui/views/widget/drop_helper.h" 36 #include "ui/views/widget/drop_helper.h"
36 #include "ui/views/widget/native_widget_aura_window_observer.h" 37 #include "ui/views/widget/native_widget_aura_window_observer.h"
37 #include "ui/views/widget/native_widget_delegate.h" 38 #include "ui/views/widget/native_widget_delegate.h"
39 #include "ui/views/widget/native_widget_window_reorderer_aura.h"
38 #include "ui/views/widget/root_view.h" 40 #include "ui/views/widget/root_view.h"
39 #include "ui/views/widget/tooltip_manager_aura.h" 41 #include "ui/views/widget/tooltip_manager_aura.h"
40 #include "ui/views/widget/widget_aura_utils.h" 42 #include "ui/views/widget/widget_aura_utils.h"
41 #include "ui/views/widget/widget_delegate.h" 43 #include "ui/views/widget/widget_delegate.h"
42 44
43 #if defined(OS_WIN) 45 #if defined(OS_WIN)
44 #include "base/win/scoped_gdi_object.h" 46 #include "base/win/scoped_gdi_object.h"
45 #include "base/win/win_util.h" 47 #include "base/win/win_util.h"
46 #include "ui/base/l10n/l10n_util_win.h" 48 #include "ui/base/l10n/l10n_util_win.h"
47 #include "ui/views/widget/desktop_aura/desktop_root_window_host_win.h" 49 #include "ui/views/widget/desktop_aura/desktop_root_window_host_win.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 params.type != Widget::InitParams::TYPE_POPUP) { 167 params.type != Widget::InitParams::TYPE_POPUP) {
166 aura::client::SetDragDropDelegate(window_, this); 168 aura::client::SetDragDropDelegate(window_, this);
167 } 169 }
168 170
169 aura::client::SetActivationDelegate(window_, this); 171 aura::client::SetActivationDelegate(window_, this);
170 172
171 window_->SetProperty(aura::client::kCanMaximizeKey, 173 window_->SetProperty(aura::client::kCanMaximizeKey,
172 GetWidget()->widget_delegate()->CanMaximize()); 174 GetWidget()->widget_delegate()->CanMaximize());
173 window_->SetProperty(aura::client::kCanResizeKey, 175 window_->SetProperty(aura::client::kCanResizeKey,
174 GetWidget()->widget_delegate()->CanResize()); 176 GetWidget()->widget_delegate()->CanResize());
177
178 window_reorderer_.reset(new NativeWidgetWindowReordererAura(window_,
179 GetWidget()->GetRootView()));
175 } 180 }
176 181
177 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { 182 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() {
178 return NULL; 183 return NULL;
179 } 184 }
180 185
181 bool NativeWidgetAura::ShouldUseNativeFrame() const { 186 bool NativeWidgetAura::ShouldUseNativeFrame() const {
182 // There is only one frame type for aura. 187 // There is only one frame type for aura.
183 return false; 188 return false;
184 } 189 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 221 }
217 222
218 ui::Compositor* NativeWidgetAura::GetCompositor() { 223 ui::Compositor* NativeWidgetAura::GetCompositor() {
219 return window_->layer()->GetCompositor(); 224 return window_->layer()->GetCompositor();
220 } 225 }
221 226
222 ui::Layer* NativeWidgetAura::GetLayer() { 227 ui::Layer* NativeWidgetAura::GetLayer() {
223 return window_->layer(); 228 return window_->layer();
224 } 229 }
225 230
231 void NativeWidgetAura::ReorderNativeViews() {
232 window_reorderer_->ReorderChildWindows();
233 }
234
226 void NativeWidgetAura::ViewRemoved(View* view) { 235 void NativeWidgetAura::ViewRemoved(View* view) {
227 DCHECK(drop_helper_.get() != NULL); 236 DCHECK(drop_helper_.get() != NULL);
228 drop_helper_->ResetTargetViewIfEquals(view); 237 drop_helper_->ResetTargetViewIfEquals(view);
229 } 238 }
230 239
231 void NativeWidgetAura::SetNativeWindowProperty(const char* name, void* value) { 240 void NativeWidgetAura::SetNativeWindowProperty(const char* name, void* value) {
232 if (window_) 241 if (window_)
233 window_->SetNativeWindowProperty(name, value); 242 window_->SetNativeWindowProperty(name, value);
234 } 243 }
235 244
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 return aura::Env::GetInstance()->is_mouse_button_down(); 1041 return aura::Env::GetInstance()->is_mouse_button_down();
1033 } 1042 }
1034 1043
1035 // static 1044 // static
1036 bool NativeWidgetPrivate::IsTouchDown() { 1045 bool NativeWidgetPrivate::IsTouchDown() {
1037 return aura::Env::GetInstance()->is_touch_down(); 1046 return aura::Env::GetInstance()->is_touch_down();
1038 } 1047 }
1039 1048
1040 } // namespace internal 1049 } // namespace internal
1041 } // namespace views 1050 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698