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

Unified Diff: app/active_window_watcher_x.h

Issue 6257006: Move a bunch of random other files to src/ui/base... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | app/active_window_watcher_x.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/active_window_watcher_x.h
===================================================================
--- app/active_window_watcher_x.h (revision 71854)
+++ app/active_window_watcher_x.h (working copy)
@@ -1,56 +0,0 @@
-// Copyright (c) 2009 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 APP_ACTIVE_WINDOW_WATCHER_X_H_
-#define APP_ACTIVE_WINDOW_WATCHER_X_H_
-#pragma once
-
-#include <gdk/gdk.h>
-
-#include "base/basictypes.h"
-#include "base/observer_list.h"
-#include "base/singleton.h"
-
-// This is a helper class that is used to keep track of which window the X
-// window manager thinks is active. Add an Observer to listener for changes to
-// the active window.
-class ActiveWindowWatcherX {
- public:
- class Observer {
- public:
- // |active_window| will be NULL if the active window isn't one of Chrome's.
- virtual void ActiveWindowChanged(GdkWindow* active_window) = 0;
-
- protected:
- virtual ~Observer() {}
- };
-
- static ActiveWindowWatcherX* GetInstance();
-
- static void AddObserver(Observer* observer);
- static void RemoveObserver(Observer* observer);
-
- private:
- friend struct DefaultSingletonTraits<ActiveWindowWatcherX>;
-
- ActiveWindowWatcherX();
- ~ActiveWindowWatcherX();
-
- void Init();
-
- // Sends a notification out through the NotificationService that the active
- // window has changed.
- void NotifyActiveWindowChanged();
-
- // Callback for PropertyChange XEvents.
- static GdkFilterReturn OnWindowXEvent(GdkXEvent* xevent,
- GdkEvent* event,
- gpointer window_watcher);
-
- ObserverList<Observer> observers_;
-
- DISALLOW_COPY_AND_ASSIGN(ActiveWindowWatcherX);
-};
-
-#endif // APP_ACTIVE_WINDOW_WATCHER_X_H_
« no previous file with comments | « no previous file | app/active_window_watcher_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698