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

Side by Side Diff: ui/base/x/root_window_property_watcher_x.h

Issue 10795024: ui: Forward declare DefaultSingletonTraits in header files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_ROOT_WINDOW_PROPERTY_WATCHER_X_H_ 5 #ifndef UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_
6 #define UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_ 6 #define UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_
7 7
8 #include <gdk/gdk.h> 8 #include <gdk/gdk.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/singleton.h"
12 #include "ui/base/gtk/gtk_signal.h" 11 #include "ui/base/gtk/gtk_signal.h"
13 #include "ui/base/ui_export.h" 12 #include "ui/base/ui_export.h"
14 13
14 template <typename T> struct DefaultSingletonTraits;
15
15 namespace ui { 16 namespace ui {
16 17
17 namespace internal { 18 namespace internal {
18 19
19 // This class keeps track of changes to properties on the root window. This is 20 // This class keeps track of changes to properties on the root window. This is
20 // not to be used directly. Implement a watcher for the specific property you're 21 // not to be used directly. Implement a watcher for the specific property you're
21 // interested in. 22 // interested in.
22 class RootWindowPropertyWatcherX { 23 class RootWindowPropertyWatcherX {
23 public: 24 public:
24 static RootWindowPropertyWatcherX* GetInstance(); 25 static RootWindowPropertyWatcherX* GetInstance();
25 26
26 private: 27 private:
27 friend struct DefaultSingletonTraits<RootWindowPropertyWatcherX>; 28 friend struct DefaultSingletonTraits<RootWindowPropertyWatcherX>;
28 29
29 RootWindowPropertyWatcherX(); 30 RootWindowPropertyWatcherX();
30 ~RootWindowPropertyWatcherX(); 31 ~RootWindowPropertyWatcherX();
31 32
32 // Callback for PropertyChange XEvents. 33 // Callback for PropertyChange XEvents.
33 CHROMEG_CALLBACK_1(RootWindowPropertyWatcherX, GdkFilterReturn, 34 CHROMEG_CALLBACK_1(RootWindowPropertyWatcherX, GdkFilterReturn,
34 OnWindowXEvent, GdkXEvent*, GdkEvent*); 35 OnWindowXEvent, GdkXEvent*, GdkEvent*);
35 36
36 DISALLOW_COPY_AND_ASSIGN(RootWindowPropertyWatcherX); 37 DISALLOW_COPY_AND_ASSIGN(RootWindowPropertyWatcherX);
37 }; 38 };
38 39
39 } // namespace internal 40 } // namespace internal
40 41
41 } // namespace ui 42 } // namespace ui
42 43
43 #endif // UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_ 44 #endif // UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698