| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "chrome/browser/chromeos/system/statistics_provider.h" | 25 #include "chrome/browser/chromeos/system/statistics_provider.h" |
| 26 #include "chrome/browser/defaults.h" | 26 #include "chrome/browser/defaults.h" |
| 27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
| 28 #include "content/public/common/main_function_params.h" | 28 #include "content/public/common/main_function_params.h" |
| 29 #include "net/base/network_change_notifier.h" | 29 #include "net/base/network_change_notifier.h" |
| 30 | 30 |
| 31 #if defined(TOOLKIT_USES_GTK) | 31 #if defined(TOOLKIT_USES_GTK) |
| 32 #include <gtk/gtk.h> | 32 #include <gtk/gtk.h> |
| 33 #endif | 33 #endif |
| 34 | 34 |
| 35 #if defined(USE_AURA) |
| 36 #include "chrome/browser/chromeos/legacy_window_manager/initial_browser_window_o
bserver.h" |
| 37 #endif |
| 38 |
| 35 class MessageLoopObserver : public MessageLoopForUI::Observer { | 39 class MessageLoopObserver : public MessageLoopForUI::Observer { |
| 36 #if defined(TOUCH_UI) || defined(USE_AURA) | 40 #if defined(TOUCH_UI) || defined(USE_AURA) |
| 37 virtual base::EventStatus WillProcessEvent( | 41 virtual base::EventStatus WillProcessEvent( |
| 38 const base::NativeEvent& event) OVERRIDE { | 42 const base::NativeEvent& event) OVERRIDE { |
| 39 return base::EVENT_CONTINUE; | 43 return base::EVENT_CONTINUE; |
| 40 } | 44 } |
| 41 | 45 |
| 42 virtual void DidProcessEvent( | 46 virtual void DidProcessEvent( |
| 43 const base::NativeEvent& event) OVERRIDE { | 47 const base::NativeEvent& event) OVERRIDE { |
| 44 } | 48 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // per signals sent from the session manager. | 177 // per signals sent from the session manager. |
| 174 session_manager_observer_.reset(new chromeos::SessionManagerObserver); | 178 session_manager_observer_.reset(new chromeos::SessionManagerObserver); |
| 175 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> | 179 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
| 176 AddObserver(session_manager_observer_.get()); | 180 AddObserver(session_manager_observer_.get()); |
| 177 | 181 |
| 178 // Initialize the network change notifier for Chrome OS. The network | 182 // Initialize the network change notifier for Chrome OS. The network |
| 179 // change notifier starts to monitor changes from the power manager and | 183 // change notifier starts to monitor changes from the power manager and |
| 180 // the network manager. | 184 // the network manager. |
| 181 chromeos::CrosNetworkChangeNotifierFactory::GetInstance()->Init(); | 185 chromeos::CrosNetworkChangeNotifierFactory::GetInstance()->Init(); |
| 182 | 186 |
| 183 // For http://crosbug.com/p/5795 and http://crosbug.com/p/6245. | |
| 184 // Enable Num Lock on X start up. | |
| 185 if (chromeos::system::runtime_environment::IsRunningOnChromeOS()) { | 187 if (chromeos::system::runtime_environment::IsRunningOnChromeOS()) { |
| 186 chromeos::input_method::InputMethodManager::GetInstance()->GetXKeyboard()-> | 188 // For http://crosbug.com/p/5795 and http://crosbug.com/p/6245. |
| 187 SetNumLockEnabled(true); | 189 // Enable Num Lock on X start up. |
| 190 chromeos::input_method::InputMethodManager::GetInstance()-> |
| 191 GetXKeyboard()->SetNumLockEnabled(true); |
| 192 |
| 193 #if defined(USE_AURA) |
| 194 initial_browser_window_observer_.reset( |
| 195 new chromeos::InitialBrowserWindowObserver); |
| 196 #endif |
| 188 } | 197 } |
| 189 } | 198 } |
| OLD | NEW |