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

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

Issue 9808010: Keep the mouse cursor within desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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 #include "ui/aura/env_observer.h" 6 #include "ui/aura/env_observer.h"
7 #include "ui/aura/single_monitor_manager.h" 7 #include "ui/aura/single_monitor_manager.h"
8 #include "ui/aura/root_window_host.h" 8 #include "ui/aura/root_window_host.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/gfx/compositor/compositor.h" 10 #include "ui/gfx/compositor/compositor.h"
11 11
12 #if defined(USE_X11)
13 #include "ui/aura/monitor_change_observer_x11.h"
14 #endif
15
16 namespace aura { 12 namespace aura {
17 13
18 // static 14 // static
19 Env* Env::instance_ = NULL; 15 Env* Env::instance_ = NULL;
20 16
21 //////////////////////////////////////////////////////////////////////////////// 17 ////////////////////////////////////////////////////////////////////////////////
22 // Env, public: 18 // Env, public:
23 19
24 Env::Env() 20 Env::Env()
25 : mouse_button_flags_(0), 21 : mouse_button_flags_(0),
26 stacking_client_(NULL), 22 stacking_client_(NULL),
27 monitor_manager_(new internal::SingleMonitorManager) 23 monitor_manager_(new internal::SingleMonitorManager)
28 #if defined(USE_X11)
29 , monitor_change_observer_(new MonitorChangeObserverX11())
30 #endif
31 { 24 {
32 #if !defined(OS_MACOSX) 25 #if !defined(OS_MACOSX)
33 dispatcher_.reset(CreateDispatcher()); 26 dispatcher_.reset(CreateDispatcher());
34 #endif 27 #endif
35 ui::Compositor::Initialize(false); 28 ui::Compositor::Initialize(false);
36 } 29 }
37 30
38 Env::~Env() { 31 Env::~Env() {
39 ui::Compositor::Terminate(); 32 ui::Compositor::Terminate();
40 } 33 }
(...skipping 30 matching lines...) Expand all
71 #endif 64 #endif
72 65
73 //////////////////////////////////////////////////////////////////////////////// 66 ////////////////////////////////////////////////////////////////////////////////
74 // Env, private: 67 // Env, private:
75 68
76 void Env::NotifyWindowInitialized(Window* window) { 69 void Env::NotifyWindowInitialized(Window* window) {
77 FOR_EACH_OBSERVER(EnvObserver, observers_, OnWindowInitialized(window)); 70 FOR_EACH_OBSERVER(EnvObserver, observers_, OnWindowInitialized(window));
78 } 71 }
79 72
80 } // namespace aura 73 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698