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 #ifndef UI_BASE_X_WORK_AREA_WATCHER_X_H_ | 5 #ifndef UI_BASE_X_WORK_AREA_WATCHER_X_H_ |
6 #define UI_BASE_X_WORK_AREA_WATCHER_X_H_ | 6 #define UI_BASE_X_WORK_AREA_WATCHER_X_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "ui/base/ui_export.h" | 10 #include "ui/base/ui_base_export.h" |
11 #include "ui/base/x/x11_util.h" | 11 #include "ui/base/x/x11_util.h" |
12 | 12 |
13 template <typename T> struct DefaultSingletonTraits; | 13 template <typename T> struct DefaultSingletonTraits; |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 | 16 |
17 class WorkAreaWatcherObserver; | 17 class WorkAreaWatcherObserver; |
18 | 18 |
19 namespace internal { | 19 namespace internal { |
20 class RootWindowPropertyWatcherX; | 20 class RootWindowPropertyWatcherX; |
21 } | 21 } |
22 | 22 |
23 // This is a helper class that is used to keep track of changes to work area. | 23 // This is a helper class that is used to keep track of changes to work area. |
24 // Add an observer to track changes. | 24 // Add an observer to track changes. |
25 class UI_EXPORT WorkAreaWatcherX { | 25 class UI_BASE_EXPORT WorkAreaWatcherX { |
26 public: | 26 public: |
27 static WorkAreaWatcherX* GetInstance(); | 27 static WorkAreaWatcherX* GetInstance(); |
28 static void AddObserver(WorkAreaWatcherObserver* observer); | 28 static void AddObserver(WorkAreaWatcherObserver* observer); |
29 static void RemoveObserver(WorkAreaWatcherObserver* observer); | 29 static void RemoveObserver(WorkAreaWatcherObserver* observer); |
30 | 30 |
31 private: | 31 private: |
32 friend struct DefaultSingletonTraits<WorkAreaWatcherX>; | 32 friend struct DefaultSingletonTraits<WorkAreaWatcherX>; |
33 friend class ui::internal::RootWindowPropertyWatcherX; | 33 friend class ui::internal::RootWindowPropertyWatcherX; |
34 | 34 |
35 WorkAreaWatcherX(); | 35 WorkAreaWatcherX(); |
(...skipping 10 matching lines...) Expand all Loading... |
46 void NotifyWorkAreaChanged(); | 46 void NotifyWorkAreaChanged(); |
47 | 47 |
48 ObserverList<WorkAreaWatcherObserver> observers_; | 48 ObserverList<WorkAreaWatcherObserver> observers_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(WorkAreaWatcherX); | 50 DISALLOW_COPY_AND_ASSIGN(WorkAreaWatcherX); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace ui | 53 } // namespace ui |
54 | 54 |
55 #endif // UI_BASE_X_WORK_AREA_WATCHER_X_H_ | 55 #endif // UI_BASE_X_WORK_AREA_WATCHER_X_H_ |
OLD | NEW |