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

Unified Diff: content/shell/shell_aura.cc

Issue 11829040: Fix the content_browsertests everywhere maybe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 7 years, 11 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 | « content/shell/shell.h ('k') | content/shell/shell_stacking_client_ash.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_aura.cc
diff --git a/content/shell/shell_aura.cc b/content/shell/shell_aura.cc
index a0986c47192f0faab60f726e00ee5c95152a4285..6641cda6ca94821e2aa06375bd5aa87db332d8cc 100644
--- a/content/shell/shell_aura.cc
+++ b/content/shell/shell_aura.cc
@@ -29,10 +29,8 @@
#if defined(OS_CHROMEOS)
#include "chromeos/dbus/dbus_thread_manager.h"
-#include "content/shell/shell_stacking_client_ash.h"
+#include "content/shell/minimal_ash.h"
#include "ui/aura/test/test_screen.h"
-#else
-#include "ui/views/widget/desktop_aura/desktop_stacking_client.h"
#endif
// ViewDelegate implementation for aura content shell
@@ -274,7 +272,9 @@ using views::ShellWindowDelegateView;
namespace content {
-aura::client::StackingClient* Shell::stacking_client_ = NULL;
+#if defined(OS_CHROMEOS)
+MinimalAsh* Shell::minimal_ash_ = NULL;
+#endif
views::ViewsDelegate* Shell::views_delegate_ = NULL;
// static
@@ -283,21 +283,21 @@ void Shell::PlatformInitialize() {
chromeos::DBusThreadManager::Initialize();
#endif
#if defined(OS_CHROMEOS)
- stacking_client_ = new content::ShellStackingClientAsh();
gfx::Screen::SetScreenInstance(
gfx::SCREEN_TYPE_NATIVE, new aura::TestScreen);
+ minimal_ash_ = new content::MinimalAsh();
#else
- stacking_client_ = new views::DesktopStackingClient();
gfx::Screen::SetScreenInstance(
gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen());
#endif
- aura::client::SetStackingClient(stacking_client_);
views_delegate_ = new ShellViewsDelegateAura();
}
void Shell::PlatformExit() {
- if (stacking_client_)
- delete stacking_client_;
+#if defined(OS_CHROMEOS)
+ if (minimal_ash_)
+ delete minimal_ash_;
+#endif
if (views_delegate_)
delete views_delegate_;
#if defined(OS_CHROMEOS)
@@ -334,9 +334,18 @@ void Shell::PlatformSetIsLoading(bool loading) {
}
void Shell::PlatformCreateWindow(int width, int height) {
+#if defined(OS_CHROMEOS)
+ window_widget_ =
+ views::Widget::CreateWindowWithContextAndBounds(
+ new ShellWindowDelegateView(this),
+ minimal_ash_->GetDefaultParent(NULL, NULL, gfx::Rect()),
+ gfx::Rect(0, 0, width, height));
+#else
window_widget_ =
views::Widget::CreateWindowWithBounds(new ShellWindowDelegateView(this),
gfx::Rect(0, 0, width, height));
+#endif
+
window_ = window_widget_->GetNativeWindow();
window_widget_->Show();
}
« no previous file with comments | « content/shell/shell.h ('k') | content/shell/shell_stacking_client_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698