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

Unified Diff: ui/views/examples/content_client/examples_browser_main_parts.cc

Issue 10083057: Revert 132856 - Aura/ash split: Remove hacks and get chrome linking without ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/examples/content_client/examples_browser_main_parts.h ('k') | ui/views/test/test_views_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/content_client/examples_browser_main_parts.cc
===================================================================
--- ui/views/examples/content_client/examples_browser_main_parts.cc (revision 132861)
+++ ui/views/examples/content_client/examples_browser_main_parts.cc (working copy)
@@ -23,14 +23,40 @@
#include "ui/views/focus/accelerator_handler.h"
#if defined(USE_AURA)
-#include "ui/aura/desktop/desktop_stacking_client.h"
+#include "ui/aura/client/stacking_client.h"
#include "ui/aura/env.h"
+#include "ui/aura/root_window.h"
+#include "ui/aura/window.h"
+#include "ui/gfx/compositor/compositor.h"
+#include "ui/gfx/compositor/test/compositor_test_support.h"
#include "ui/views/widget/native_widget_aura.h"
#endif
namespace views {
namespace examples {
+namespace {
+#if defined(USE_AURA)
+class RootWindowStackingClient : public aura::client::StackingClient {
+ public:
+ explicit RootWindowStackingClient() {
+ aura::client::SetStackingClient(this);
+ }
+ virtual ~RootWindowStackingClient() {
+ aura::client::SetStackingClient(NULL);
+ }
+
+ // Overridden from aura::client::StackingClient:
+ virtual aura::Window* GetDefaultParent(aura::Window* window) OVERRIDE {
+ return window->GetRootWindow();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RootWindowStackingClient);
+};
+#endif
+}
+
ExamplesBrowserMainParts::ExamplesBrowserMainParts(
const content::MainFunctionParams& parameters)
: BrowserMainParts(),
@@ -53,7 +79,10 @@
browser_context_.reset(new content::ShellBrowserContext);
#if defined(USE_AURA)
- stacking_client_.reset(new aura::DesktopStackingClient);
+ // TURN ON THE HAX.
+ views::NativeWidgetAura::set_aura_desktop_hax();
+ ui::CompositorTestSupport::Initialize();
+ root_window_stacking_client_.reset(new RootWindowStackingClient);
#endif
views_delegate_.reset(new views::TestViewsDelegate);
@@ -67,8 +96,9 @@
browser_context_.reset();
views_delegate_.reset();
#if defined(USE_AURA)
- stacking_client_.reset();
+ root_window_stacking_client_.reset();
aura::Env::DeleteInstance();
+ ui::CompositorTestSupport::Terminate();
#endif
}
« no previous file with comments | « ui/views/examples/content_client/examples_browser_main_parts.h ('k') | ui/views/test/test_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698