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

Side by Side Diff: content/shell/minimal_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: Fix mac build failure Created 7 years, 10 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 unified diff | Download patch
« no previous file with comments | « content/shell/minimal_ash.h ('k') | content/shell/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/minimal_ash.h" 5 #include "content/shell/minimal_ash.h"
6 6
7 #include "ui/aura/client/default_capture_client.h" 7 #include "ui/aura/client/default_capture_client.h"
8 #include "ui/aura/focus_manager.h" 8 #include "ui/aura/focus_manager.h"
9 #include "ui/aura/root_window.h" 9 #include "ui/aura/root_window.h"
10 #include "ui/aura/test/test_activation_client.h" 10 #include "ui/aura/test/test_activation_client.h"
11 #include "ui/views/corewm/compound_event_filter.h" 11 #include "ui/views/corewm/compound_event_filter.h"
12 #include "ui/views/corewm/input_method_event_filter.h" 12 #include "ui/views/corewm/input_method_event_filter.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 MinimalAsh::MinimalAsh() { 16 MinimalAsh::MinimalAsh(const gfx::Size& default_window_size) {
17 root_window_.reset(new aura::RootWindow( 17 root_window_.reset(new aura::RootWindow(
18 aura::RootWindow::CreateParams(gfx::Rect(100, 100)))); 18 aura::RootWindow::CreateParams(
19 gfx::Rect(default_window_size))));
19 root_window_->Init(); 20 root_window_->Init();
20 aura::client::SetStackingClient(root_window_.get(), this); 21 aura::client::SetStackingClient(root_window_.get(), this);
21 22
22 focus_client_.reset(new aura::FocusManager); 23 focus_client_.reset(new aura::FocusManager);
23 aura::client::SetFocusClient(root_window_.get(), focus_client_.get()); 24 aura::client::SetFocusClient(root_window_.get(), focus_client_.get());
24 25
25 root_window_event_filter_ = new views::corewm::CompoundEventFilter; 26 root_window_event_filter_ = new views::corewm::CompoundEventFilter;
26 // Pass ownership of the filter to the root_window. 27 // Pass ownership of the filter to the root_window.
27 root_window_->SetEventFilter(root_window_event_filter_); 28 root_window_->SetEventFilter(root_window_event_filter_);
28 29
(...skipping 15 matching lines...) Expand all
44 } 45 }
45 46
46 aura::Window* MinimalAsh::GetDefaultParent( 47 aura::Window* MinimalAsh::GetDefaultParent(
47 aura::Window* context, 48 aura::Window* context,
48 aura::Window* window, 49 aura::Window* window,
49 const gfx::Rect& bounds) { 50 const gfx::Rect& bounds) {
50 return root_window_.get(); 51 return root_window_.get();
51 } 52 }
52 53
53 } // namespace content 54 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/minimal_ash.h ('k') | content/shell/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698