| OLD | NEW |
| 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 "ui/aura/cursor_manager.h" | 7 #include "ui/aura/cursor_manager.h" |
| 8 #include "ui/aura/env_observer.h" | 8 #include "ui/aura/env_observer.h" |
| 9 #include "ui/aura/event_filter.h" | 9 #include "ui/aura/event_filter.h" |
| 10 #include "ui/aura/monitor_manager.h" | 10 #include "ui/aura/monitor_manager.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } | 54 } |
| 55 | 55 |
| 56 void Env::RemoveObserver(EnvObserver* observer) { | 56 void Env::RemoveObserver(EnvObserver* observer) { |
| 57 observers_.RemoveObserver(observer); | 57 observers_.RemoveObserver(observer); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void Env::SetMonitorManager(MonitorManager* monitor_manager) { | 60 void Env::SetMonitorManager(MonitorManager* monitor_manager) { |
| 61 monitor_manager_.reset(monitor_manager); | 61 monitor_manager_.reset(monitor_manager); |
| 62 #if defined(USE_X11) | 62 #if defined(USE_X11) |
| 63 // Update the monitor manager with latest info. | 63 // Update the monitor manager with latest info. |
| 64 monitor_change_observer_->NotifyMonitorChange(); | 64 monitor_change_observer_->NotifyDisplayChange(); |
| 65 #endif | 65 #endif |
| 66 } | 66 } |
| 67 | 67 |
| 68 void Env::SetEventFilter(EventFilter* event_filter) { | 68 void Env::SetEventFilter(EventFilter* event_filter) { |
| 69 event_filter_.reset(event_filter); | 69 event_filter_.reset(event_filter); |
| 70 } | 70 } |
| 71 | 71 |
| 72 #if !defined(OS_MACOSX) | 72 #if !defined(OS_MACOSX) |
| 73 MessageLoop::Dispatcher* Env::GetDispatcher() { | 73 MessageLoop::Dispatcher* Env::GetDispatcher() { |
| 74 return dispatcher_.get(); | 74 return dispatcher_.get(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 86 monitor_change_observer_.reset(new internal::MonitorChangeObserverX11); | 86 monitor_change_observer_.reset(new internal::MonitorChangeObserverX11); |
| 87 #endif | 87 #endif |
| 88 ui::Compositor::Initialize(false); | 88 ui::Compositor::Initialize(false); |
| 89 } | 89 } |
| 90 | 90 |
| 91 void Env::NotifyWindowInitialized(Window* window) { | 91 void Env::NotifyWindowInitialized(Window* window) { |
| 92 FOR_EACH_OBSERVER(EnvObserver, observers_, OnWindowInitialized(window)); | 92 FOR_EACH_OBSERVER(EnvObserver, observers_, OnWindowInitialized(window)); |
| 93 } | 93 } |
| 94 | 94 |
| 95 } // namespace aura | 95 } // namespace aura |
| OLD | NEW |