diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-06 01:58:42 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-06 01:58:42 +0000 |
commit | 31805a14ec8fe484ad1d08aafb48ebc868db7a77 (patch) | |
tree | 8060dd5f2264c33694099ca81b2acb134f355a36 | |
parent | fef27f87e0a322e2e17243cbb46ba29c39fa2751 (diff) | |
download | chromium_src-31805a14ec8fe484ad1d08aafb48ebc868db7a77.zip chromium_src-31805a14ec8fe484ad1d08aafb48ebc868db7a77.tar.gz chromium_src-31805a14ec8fe484ad1d08aafb48ebc868db7a77.tar.bz2 |
Remove InitialBrowserObserver
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/9956089
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131067 0039d316-1c4b-4281-b951-d872f2087c98
5 files changed, 0 insertions, 102 deletions
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc index b7aa692..25e5eb2 100644 --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc @@ -26,7 +26,6 @@ #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h" #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" -#include "chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.h" #include "chrome/browser/chromeos/login/authenticator.h" #include "chrome/browser/chromeos/login/login_utils.h" #include "chrome/browser/chromeos/login/ownership_service.h" @@ -283,8 +282,6 @@ void ChromeBrowserMainPartsChromeos::PostMainMessageLoopStart() { chromeos::input_method::InputMethodManager::GetInstance()-> GetXKeyboard()->SetNumLockEnabled(true); #endif - initial_browser_window_observer_.reset( - new chromeos::InitialBrowserWindowObserver); } ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.h b/chrome/browser/chromeos/chrome_browser_main_chromeos.h index 463ca85..1980810 100644 --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.h +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.h @@ -11,7 +11,6 @@ namespace chromeos { class BrightnessObserver; class DesktopBackgroundObserver; -class InitialBrowserWindowObserver; class PowerButtonObserver; class PowerStateOverride; class ResumeObserver; @@ -46,8 +45,6 @@ class ChromeBrowserMainPartsChromeos : public ChromeBrowserMainPartsLinux { scoped_ptr<chromeos::ScreenLockObserver> screen_lock_observer_; scoped_ptr<chromeos::SessionManagerObserver> session_manager_observer_; scoped_ptr<chromeos::DesktopBackgroundObserver> desktop_background_observer_; - scoped_ptr<chromeos::InitialBrowserWindowObserver> - initial_browser_window_observer_; scoped_ptr<chromeos::PowerButtonObserver> power_button_observer_; scoped_ptr<chromeos::PowerStateOverride> power_state_override_; scoped_ptr<chromeos::VideoPropertyWriter> video_property_writer_; 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 deleted file mode 100644 index b97f234..0000000 --- a/chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.cc +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012 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/bind.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/browser_thread.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"; - -void WriteInitialWindowFile() { - if (file_util::WriteFile(FilePath(kInitialWindowFile), "", 0) == -1) - LOG(ERROR) << "Failed to touch " << kInitialWindowFile; -} - -} // 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(); - content::BrowserThread::PostTask( - content::BrowserThread::FILE, FROM_HERE, - base::Bind(&WriteInitialWindowFile)); -} - -} // namespace chromeos 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 deleted file mode 100644 index c24604b..0000000 --- a/chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.h +++ /dev/null @@ -1,47 +0,0 @@ -// 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(); - virtual ~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_ diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index a260ba1..284b1cf 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -580,8 +580,6 @@ 'browser/chromeos/kiosk_mode/kiosk_mode_settings.h', 'browser/chromeos/language_preferences.cc', 'browser/chromeos/language_preferences.h', - 'browser/chromeos/legacy_window_manager/initial_browser_window_observer.cc', - 'browser/chromeos/legacy_window_manager/initial_browser_window_observer.h', 'browser/chromeos/locale_change_guard.cc', 'browser/chromeos/locale_change_guard.h', 'browser/chromeos/login/auth_attempt_state.cc', |