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

Unified Diff: chrome/browser/ui/aura/stacking_client_aura.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/aura/stacking_client_aura.h ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/aura/stacking_client_aura.cc
diff --git a/chrome/browser/ui/aura/stacking_client_aura.cc b/chrome/browser/ui/aura/stacking_client_aura.cc
new file mode 100644
index 0000000000000000000000000000000000000000..569c7a5884d089918323061c35e9f6e56db10ff5
--- /dev/null
+++ b/chrome/browser/ui/aura/stacking_client_aura.cc
@@ -0,0 +1,33 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/aura/stacking_client_aura.h"
+
+#include "ash/shell.h"
+#include "ash/wm/stacking_controller.h"
+#include "ui/aura/desktop/desktop_stacking_client.h"
+#include "ui/aura/focus_manager.h"
+#include "ui/aura/root_window.h"
+#include "ui/aura/window.h"
+#include "ui/views/widget/desktop_native_widget_aura.h"
+
+StackingClientAura::StackingClientAura() {
+ desktop_stacking_client_.reset(new aura::DesktopStackingClient);
+}
+
+StackingClientAura::~StackingClientAura() {
+}
+
+aura::Window* StackingClientAura::GetDefaultParent(aura::Window* context,
+ aura::Window* window,
+ const gfx::Rect& bounds) {
+#if defined(USE_ASH)
+ if (chrome::GetHostDesktopTypeForNativeView(context) ==
+ chrome::HOST_DESKTOP_TYPE_ASH) {
+ return ash::Shell::GetInstance()->stacking_client()->GetDefaultParent(
+ context, window, bounds);
+ }
+#endif
+ return desktop_stacking_client_->GetDefaultParent(context, window, bounds);
+}
« no previous file with comments | « chrome/browser/ui/aura/stacking_client_aura.h ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698