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

Unified Diff: content/shell/shell_stacking_client_ash.cc

Issue 11614037: Call ShowRootWindow on NativeWindow's RootWindow to display the window. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Create RootWindowFirst 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
Index: content/shell/shell_stacking_client_ash.cc
diff --git a/content/shell/shell_stacking_client_ash.cc b/content/shell/shell_stacking_client_ash.cc
index f9e7c0a644f2fa8a7ce9fd96f1db654d9e700e27..8d6b80b3576dabf27939d1e19fd66464c06070c6 100644
--- a/content/shell/shell_stacking_client_ash.cc
+++ b/content/shell/shell_stacking_client_ash.cc
@@ -13,7 +13,8 @@
namespace content {
-ShellStackingClientAsh::ShellStackingClientAsh() {
+ShellStackingClientAsh::ShellStackingClientAsh(aura::RootWindow* root_window)
+ : root_window_(root_window){
}
ShellStackingClientAsh::~ShellStackingClientAsh() {
@@ -27,29 +28,33 @@ aura::Window* ShellStackingClientAsh::GetDefaultParent(
aura::Window* context,
aura::Window* window,
const gfx::Rect& bounds) {
- if (!root_window_.get()) {
- root_window_.reset(new aura::RootWindow(
- aura::RootWindow::CreateParams(gfx::Rect(100, 100))));
- root_window_->Init();
+ if (!focus_client_.get()) {
sky 2013/01/15 21:53:49 Can we instead have an Init() method that does thi
Nayan 2013/01/15 23:39:03 Done.
focus_client_.reset(new aura::FocusManager);
aura::client::SetFocusClient(root_window_.get(), focus_client_.get());
+ }
+ if (!input_method_filter_.get()) {
root_window_event_filter_ = new views::corewm::CompoundEventFilter;
// Pass ownership of the filter to the root_window.
root_window_->SetEventFilter(root_window_event_filter_);
input_method_filter_.reset(new views::corewm::InputMethodEventFilter(
- root_window_->GetAcceleratedWidget()));
+ root_window_->GetAcceleratedWidget()));
input_method_filter_->SetInputMethodPropertyInRootWindow(
root_window_.get());
root_window_event_filter_->AddHandler(input_method_filter_.get());
+ }
+ if (!test_activation_client_.get()) {
test_activation_client_.reset(
new aura::test::TestActivationClient(root_window_.get()));
+ }
+ if (!capture_client_.get()) {
capture_client_.reset(
new aura::client::DefaultCaptureClient(root_window_.get()));
}
+
return root_window_.get();
}

Powered by Google App Engine
This is Rietveld 408576698