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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_stacking_client.cc

Issue 11377140: re-re-land of https://codereview.chromium.org/11364053/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more renames\! Created 8 years, 1 month 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
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 "ui/views/widget/desktop_aura/desktop_stacking_client.h" 5 #include "ui/views/widget/desktop_aura/desktop_stacking_client.h"
6 6
7 #include "ui/aura/client/activation_client.h" 7 #include "ui/aura/client/activation_client.h"
8 #include "ui/aura/client/default_capture_client.h" 8 #include "ui/aura/client/default_capture_client.h"
9 #include "ui/aura/focus_manager.h" 9 #include "ui/aura/focus_manager.h"
10 #include "ui/aura/root_window.h" 10 #include "ui/aura/root_window.h"
11 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
12 #include "ui/views/corewm/compound_event_filter.h" 12 #include "ui/views/corewm/compound_event_filter.h"
13 #include "ui/views/corewm/input_method_event_filter.h" 13 #include "ui/views/corewm/input_method_event_filter.h"
14 #include "ui/views/widget/desktop_aura/desktop_activation_client.h" 14 #include "ui/views/widget/desktop_aura/desktop_activation_client.h"
15 15
16 namespace views { 16 namespace views {
17 17
18 DesktopStackingClient::DesktopStackingClient() 18 DesktopStackingClient::DesktopStackingClient()
19 : window_event_filter_(NULL) { 19 : window_event_filter_(NULL) {
20 aura::client::SetStackingClient(this); 20 aura::client::SetStackingClient(this);
21 } 21 }
22 22
23 DesktopStackingClient::~DesktopStackingClient() { 23 DesktopStackingClient::~DesktopStackingClient() {
24 if (window_event_filter_) 24 if (window_event_filter_)
25 window_event_filter_->RemoveFilter(input_method_filter_.get()); 25 window_event_filter_->RemoveFilter(input_method_filter_.get());
26 26
27 aura::client::SetStackingClient(NULL); 27 aura::client::SetStackingClient(NULL);
28 } 28 }
29 29
30 aura::Window* DesktopStackingClient::GetDefaultParent(aura::Window* window, 30 aura::Window* DesktopStackingClient::GetDefaultParent(aura::Window* context,
31 aura::Window* window,
31 const gfx::Rect& bounds) { 32 const gfx::Rect& bounds) {
32 if (!null_parent_.get()) 33 if (!null_parent_.get())
33 CreateNULLParent(); 34 CreateNULLParent();
34 35
35 return null_parent_.get(); 36 return null_parent_.get();
36 } 37 }
37 38
38 void DesktopStackingClient::CreateNULLParent() { 39 void DesktopStackingClient::CreateNULLParent() {
39 focus_manager_.reset(new aura::FocusManager); 40 focus_manager_.reset(new aura::FocusManager);
40 41
(...skipping 12 matching lines...) Expand all
53 54
54 input_method_filter_.reset(new corewm::InputMethodEventFilter); 55 input_method_filter_.reset(new corewm::InputMethodEventFilter);
55 input_method_filter_->SetInputMethodPropertyInRootWindow(null_parent_.get()); 56 input_method_filter_->SetInputMethodPropertyInRootWindow(null_parent_.get());
56 window_event_filter_->AddFilter(input_method_filter_.get()); 57 window_event_filter_->AddFilter(input_method_filter_.get());
57 58
58 capture_client_.reset( 59 capture_client_.reset(
59 new aura::client::DefaultCaptureClient(null_parent_.get())); 60 new aura::client::DefaultCaptureClient(null_parent_.get()));
60 } 61 }
61 62
62 } // namespace views 63 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_stacking_client.h ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698