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

Side by Side Diff: content/shell/shell_stacking_client_ash.cc

Issue 11299219: Rework FocusManager as FocusClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « content/shell/shell_stacking_client_ash.h ('k') | ui/aura/aura.gyp » ('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/shell_stacking_client_ash.h" 5 #include "content/shell/shell_stacking_client_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"
(...skipping 10 matching lines...) Expand all
21 root_window_event_filter_->RemoveHandler(input_method_filter_.get()); 21 root_window_event_filter_->RemoveHandler(input_method_filter_.get());
22 22
23 aura::client::SetStackingClient(NULL); 23 aura::client::SetStackingClient(NULL);
24 } 24 }
25 25
26 aura::Window* ShellStackingClientAsh::GetDefaultParent( 26 aura::Window* ShellStackingClientAsh::GetDefaultParent(
27 aura::Window* context, 27 aura::Window* context,
28 aura::Window* window, 28 aura::Window* window,
29 const gfx::Rect& bounds) { 29 const gfx::Rect& bounds) {
30 if (!root_window_.get()) { 30 if (!root_window_.get()) {
31 aura::FocusManager* focus_manager = new aura::FocusManager;
32
33 root_window_.reset(new aura::RootWindow( 31 root_window_.reset(new aura::RootWindow(
34 aura::RootWindow::CreateParams(gfx::Rect(100, 100)))); 32 aura::RootWindow::CreateParams(gfx::Rect(100, 100))));
35 root_window_->Init(); 33 root_window_->Init();
36 root_window_->set_focus_manager(focus_manager); 34 focus_client_.reset(new aura::FocusManager);
35 aura::client::SetFocusClient(root_window_.get(), focus_client_.get());
37 36
38 root_window_event_filter_ = new views::corewm::CompoundEventFilter; 37 root_window_event_filter_ = new views::corewm::CompoundEventFilter;
39 // Pass ownership of the filter to the root_window. 38 // Pass ownership of the filter to the root_window.
40 root_window_->SetEventFilter(root_window_event_filter_); 39 root_window_->SetEventFilter(root_window_event_filter_);
41 40
42 input_method_filter_.reset(new views::corewm::InputMethodEventFilter); 41 input_method_filter_.reset(new views::corewm::InputMethodEventFilter);
43 input_method_filter_->SetInputMethodPropertyInRootWindow( 42 input_method_filter_->SetInputMethodPropertyInRootWindow(
44 root_window_.get()); 43 root_window_.get());
45 root_window_event_filter_->AddHandler(input_method_filter_.get()); 44 root_window_event_filter_->AddHandler(input_method_filter_.get());
46 45
47 test_activation_client_.reset( 46 test_activation_client_.reset(
48 new aura::test::TestActivationClient(root_window_.get())); 47 new aura::test::TestActivationClient(root_window_.get()));
49 48
50 capture_client_.reset( 49 capture_client_.reset(
51 new aura::client::DefaultCaptureClient(root_window_.get())); 50 new aura::client::DefaultCaptureClient(root_window_.get()));
52 } 51 }
53 return root_window_.get(); 52 return root_window_.get();
54 } 53 }
55 54
56 } // namespace content 55 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_stacking_client_ash.h ('k') | ui/aura/aura.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698