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

Side by Side Diff: ui/aura/window.cc

Issue 11364053: make StackingClient dispatch to either ash or desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + disable prerender tests on win-aura Created 8 years, 1 month 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/aura/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 22 matching lines...) Expand all
33 #include "ui/gfx/screen.h" 33 #include "ui/gfx/screen.h"
34 34
35 namespace aura { 35 namespace aura {
36 36
37 namespace { 37 namespace {
38 38
39 Window* GetParentForWindow(Window* window, Window* suggested_parent) { 39 Window* GetParentForWindow(Window* window, Window* suggested_parent) {
40 if (suggested_parent) 40 if (suggested_parent)
41 return suggested_parent; 41 return suggested_parent;
42 if (client::GetStackingClient()) 42 if (client::GetStackingClient())
43 return client::GetStackingClient()->GetDefaultParent(window, gfx::Rect()); 43 return client::GetStackingClient()->GetDefaultParent(
44 window, window, gfx::Rect());
44 return NULL; 45 return NULL;
45 } 46 }
46 47
47 } // namespace 48 } // namespace
48 49
49 Window::TestApi::TestApi(Window* window) : window_(window) {} 50 Window::TestApi::TestApi(Window* window) : window_(window) {}
50 51
51 bool Window::TestApi::OwnsLayer() const { 52 bool Window::TestApi::OwnsLayer() const {
52 return !!window_->layer_owner_.get(); 53 return !!window_->layer_owner_.get();
53 } 54 }
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 bool contains_mouse = false; 969 bool contains_mouse = false;
969 if (IsVisible()) { 970 if (IsVisible()) {
970 RootWindow* root_window = GetRootWindow(); 971 RootWindow* root_window = GetRootWindow();
971 contains_mouse = root_window && 972 contains_mouse = root_window &&
972 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); 973 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot());
973 } 974 }
974 return contains_mouse; 975 return contains_mouse;
975 } 976 }
976 977
977 } // namespace aura 978 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/test/test_stacking_client.cc ('k') | ui/views/examples/content_client/examples_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698