Index: content/shell/shell_aura.cc |
diff --git a/content/shell/shell_aura.cc b/content/shell/shell_aura.cc |
index a0986c47192f0faab60f726e00ee5c95152a4285..e25caf767134f527294ad85ed7bb3fe78c1252fd 100644 |
--- a/content/shell/shell_aura.cc |
+++ b/content/shell/shell_aura.cc |
@@ -283,9 +283,10 @@ 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); |
+ aura::RootWindow* root_window = CreateRootWindow(kTestWindowWidth, kTestWindowHeight); |
sky
2013/01/15 21:53:49
> 80
Nayan
2013/01/15 23:39:03
Done.
|
+ stacking_client_ = new content::ShellStackingClientAsh(root_window); |
#else |
stacking_client_ = new views::DesktopStackingClient(); |
gfx::Screen::SetScreenInstance( |
@@ -295,6 +296,13 @@ void Shell::PlatformInitialize() { |
views_delegate_ = new ShellViewsDelegateAura(); |
} |
+aura::RootWindow* Shell::CreateRootWindow(int width, int height) { |
sky
2013/01/15 21:53:49
Convention for static members/methods is to put:
/
Nayan
2013/01/15 23:39:03
Done.
|
+ aura::RootWindow* root_window = new aura::RootWindow( |
+ aura::RootWindow::CreateParams(gfx::Rect(0, 0, width, height))); |
+ root_window->Init(); |
+ return root_window; |
+} |
+ |
void Shell::PlatformExit() { |
if (stacking_client_) |
delete stacking_client_; |
@@ -335,9 +343,12 @@ void Shell::PlatformSetIsLoading(bool loading) { |
void Shell::PlatformCreateWindow(int width, int height) { |
window_widget_ = |
- views::Widget::CreateWindowWithBounds(new ShellWindowDelegateView(this), |
- gfx::Rect(0, 0, width, height)); |
+ views::Widget::CreateWindowWithContextAndBounds(new ShellWindowDelegateView(this), |
sky
2013/01/15 21:53:49
> 80
Nayan
2013/01/15 23:39:03
Done.
|
+ Shell::stacking_client_->GetDefaultParent(NULL, NULL, gfx::Rect()), |
+ gfx::Rect(0, 0, width, height)); |
window_ = window_widget_->GetNativeWindow(); |
+ // Explicitly call show on the root window. |
sky
2013/01/15 21:53:49
This just says what the code does. Comment should
Nayan
2013/01/15 23:39:03
Done.
|
+ window_->GetRootWindow()->ShowRootWindow(); |
window_widget_->Show(); |
} |