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

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

Issue 23882007: Explicit initialization of aura::Env for browser shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary call Created 7 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 #ifndef UI_AURA_ENV_H_ 5 #ifndef UI_AURA_ENV_H_
6 #define UI_AURA_ENV_H_ 6 #define UI_AURA_ENV_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 16 matching lines...) Expand all
27 base::MessageLoop::Dispatcher* CreateDispatcher(); 27 base::MessageLoop::Dispatcher* CreateDispatcher();
28 #endif 28 #endif
29 29
30 // A singleton object that tracks general state within Aura. 30 // A singleton object that tracks general state within Aura.
31 // TODO(beng): manage RootWindows. 31 // TODO(beng): manage RootWindows.
32 class AURA_EXPORT Env : public ui::EventTarget { 32 class AURA_EXPORT Env : public ui::EventTarget {
33 public: 33 public:
34 Env(); 34 Env();
35 virtual ~Env(); 35 virtual ~Env();
36 36
37 static void CreateInstance();
37 static Env* GetInstance(); 38 static Env* GetInstance();
38 static void DeleteInstance(); 39 static void DeleteInstance();
39 40
40 void AddObserver(EnvObserver* observer); 41 void AddObserver(EnvObserver* observer);
41 void RemoveObserver(EnvObserver* observer); 42 void RemoveObserver(EnvObserver* observer);
42 43
43 bool is_mouse_button_down() const { return mouse_button_flags_ != 0; } 44 bool is_mouse_button_down() const { return mouse_button_flags_ != 0; }
44 void set_mouse_button_flags(int mouse_button_flags) { 45 void set_mouse_button_flags(int mouse_button_flags) {
45 mouse_button_flags_ = mouse_button_flags; 46 mouse_button_flags_ = mouse_button_flags;
46 } 47 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 #if defined(USE_X11) 98 #if defined(USE_X11)
98 DeviceListUpdaterAuraX11 device_list_updater_aurax11_; 99 DeviceListUpdaterAuraX11 device_list_updater_aurax11_;
99 #endif 100 #endif
100 101
101 DISALLOW_COPY_AND_ASSIGN(Env); 102 DISALLOW_COPY_AND_ASSIGN(Env);
102 }; 103 };
103 104
104 } // namespace aura 105 } // namespace aura
105 106
106 #endif // UI_AURA_ENV_H_ 107 #endif // UI_AURA_ENV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698