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

Unified Diff: chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.h

Issue 8539051: aura: Touch state file after first browser is ready. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update more includes Created 9 years, 1 month 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
Index: chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.h
diff --git a/chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.h b/chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..3e3e2dfa7d53bfb167c7880e9da323bcd0af3907
--- /dev/null
+++ b/chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.h
@@ -0,0 +1,47 @@
+// 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 CHROME_BROWSER_CHROMEOS_LEGACY_WINDOW_MANAGER_INITIAL_BROWSER_WINDOW_OBSERVER_H_
+#define CHROME_BROWSER_CHROMEOS_LEGACY_WINDOW_MANAGER_INITIAL_BROWSER_WINDOW_OBSERVER_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+
+namespace content {
+class NotificationDetails;
+class NotificationSource;
+}
+
+namespace chromeos {
+
+// The old X window manager for Chrome OS touches a file under /var/run/state
+// when it sees the first Chrome browser window get mapped post-login. Tests
+// then watch for this file to determine when login is completed. There's no X
+// window manager running for Aura builds, so we make Chrome replicate this
+// behavior itself.
+//
+// TODO(derat): Once Aura is fully in use in Chrome OS, remove this and make
+// tests instead use pyauto to communicate with Chrome.
+class InitialBrowserWindowObserver : public content::NotificationObserver {
+ public:
+ InitialBrowserWindowObserver();
+ ~InitialBrowserWindowObserver() {}
+
+ // content::NotificationObserver implementation:
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
+ private:
+ content::NotificationRegistrar registrar_;
+
+ DISALLOW_COPY_AND_ASSIGN(InitialBrowserWindowObserver);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_LEGACY_WINDOW_MANAGER_INITIAL_BROWSER_WINDOW_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698