Chromium Code Reviews| Index: ui/base/x/root_window_property_watcher_x.h |
| diff --git a/ui/base/x/root_window_property_watcher_x.h b/ui/base/x/root_window_property_watcher_x.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9a91a94c83679de910f5c44ccc584c7c0a56089a |
| --- /dev/null |
| +++ b/ui/base/x/root_window_property_watcher_x.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_ |
| +#define UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_ |
| +#pragma once |
| + |
| +#include <gdk/gdk.h> |
| + |
| +#include "base/memory/singleton.h" |
| +#include "ui/base/gtk/gtk_signal.h" |
| +#include "ui/base/ui_export.h" |
| + |
| +namespace ui { |
|
sky
2011/11/18 17:54:22
Put this in an internal namespace (ui::internal) i
prasadt
2011/11/18 22:31:42
Done.
|
| + |
| +// This class keeps track of changes to properties on root window. This is not |
|
sky
2011/11/18 17:54:22
'on root' -> 'on the root'
prasadt
2011/11/18 22:31:42
Done.
|
| +// to be used directly. Implement a watcher for the specific property you're |
| +// interested in. |
| +class UI_EXPORT RootWindowPropertyWatcherX { |
| + public: |
| + static RootWindowPropertyWatcherX* GetInstance(); |
| + |
| + private: |
| + friend struct DefaultSingletonTraits<RootWindowPropertyWatcherX>; |
| + |
| + RootWindowPropertyWatcherX(); |
| + ~RootWindowPropertyWatcherX(); |
| + |
| + // Callback for PropertyChange XEvents. |
| + CHROMEG_CALLBACK_1(RootWindowPropertyWatcherX, GdkFilterReturn, |
| + OnWindowXEvent, GdkXEvent*, GdkEvent*); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(RootWindowPropertyWatcherX); |
| +}; |
| + |
| +} // namespace ui |
| + |
| +#endif // UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_ |