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

Side by Side Diff: ui/aura/env.cc

Issue 10960015: aura: Start converting event-filters into event-handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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 | 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/aura/env.h" 5 #include "ui/aura/env.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "ui/aura/client/screen_position_client.h" 8 #include "ui/aura/client/screen_position_client.h"
9 #include "ui/aura/env_observer.h" 9 #include "ui/aura/env_observer.h"
10 #include "ui/aura/event_filter.h" 10 #include "ui/aura/event_filter.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 void Env::SetDisplayManager(DisplayManager* display_manager) { 92 void Env::SetDisplayManager(DisplayManager* display_manager) {
93 display_manager_.reset(display_manager); 93 display_manager_.reset(display_manager);
94 #if defined(USE_X11) 94 #if defined(USE_X11)
95 // Update the display manager with latest info. 95 // Update the display manager with latest info.
96 display_change_observer_->NotifyDisplayChange(); 96 display_change_observer_->NotifyDisplayChange();
97 #endif 97 #endif
98 } 98 }
99 99
100 void Env::SetEventFilter(EventFilter* event_filter) {
101 event_filter_.reset(event_filter);
102 }
103
104 #if !defined(OS_MACOSX) 100 #if !defined(OS_MACOSX)
105 MessageLoop::Dispatcher* Env::GetDispatcher() { 101 MessageLoop::Dispatcher* Env::GetDispatcher() {
106 #if defined(USE_X11) 102 #if defined(USE_X11)
107 return base::MessagePumpAuraX11::Current(); 103 return base::MessagePumpAuraX11::Current();
108 #else 104 #else
109 return dispatcher_.get(); 105 return dispatcher_.get();
110 #endif 106 #endif
111 } 107 }
112 #endif 108 #endif
113 109
(...skipping 14 matching lines...) Expand all
128 #endif 124 #endif
129 ui::Compositor::Initialize( 125 ui::Compositor::Initialize(
130 CommandLine::ForCurrentProcess()->HasSwitch( 126 CommandLine::ForCurrentProcess()->HasSwitch(
131 switches::kUIEnableThreadedCompositing)); 127 switches::kUIEnableThreadedCompositing));
132 } 128 }
133 129
134 void Env::NotifyWindowInitialized(Window* window) { 130 void Env::NotifyWindowInitialized(Window* window) {
135 FOR_EACH_OBSERVER(EnvObserver, observers_, OnWindowInitialized(window)); 131 FOR_EACH_OBSERVER(EnvObserver, observers_, OnWindowInitialized(window));
136 } 132 }
137 133
134 ////////////////////////////////////////////////////////////////////////////////
135 // Env, ui::EventTarget implementation:
136
137 bool Env::CanAcceptEvents() {
138 return true;
139 }
140
141 ui::EventTarget* Env::GetParentTarget() {
142 return NULL;
143 }
144
138 } // namespace aura 145 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/env.h ('k') | ui/aura/root_window.h » ('j') | ui/aura/root_window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698