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

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

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.cc
diff --git a/chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.cc b/chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6440027e97c4da2583ef268c40518c07277a79ca
--- /dev/null
+++ b/chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.cc
@@ -0,0 +1,38 @@
+// 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.
+
+#include "chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.h"
+
+#include "base/file_path.h"
+#include "base/file_util.h"
+#include "base/logging.h"
+#include "chrome/common/chrome_notification_types.h"
+#include "content/public/browser/notification_service.h"
+
+namespace {
+
+// Taken from the --initial_chrome_window_mapped_file flag in the chromeos-wm
+// command line: http://goo.gl/uLwIL
+const char kInitialWindowFile[] =
+ "/var/run/state/windowmanager/initial-chrome-window-mapped";
+
+} // namespace
+
+namespace chromeos {
+
+InitialBrowserWindowObserver::InitialBrowserWindowObserver() {
+ registrar_.Add(this,
+ chrome::NOTIFICATION_BROWSER_WINDOW_READY,
+ content::NotificationService::AllSources());
+}
+
+void InitialBrowserWindowObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ registrar_.RemoveAll();
+ file_util::WriteFile(FilePath(kInitialWindowFile), "", 0);
+}
+
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698