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

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 8491043: Allow linker initialization of lazy instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: willchan comments + rebase 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // Add the third (right) button state. 65 // Add the third (right) button state.
66 event->button.state |= GDK_BUTTON3_MASK; 66 event->button.state |= GDK_BUTTON3_MASK;
67 } 67 }
68 } 68 }
69 69
70 virtual void DidProcessEvent(GdkEvent* event) { 70 virtual void DidProcessEvent(GdkEvent* event) {
71 } 71 }
72 #endif 72 #endif
73 }; 73 };
74 74
75 static base::LazyInstance<MessageLoopObserver> g_message_loop_observer( 75 static base::LazyInstance<MessageLoopObserver> g_message_loop_observer =
76 base::LINKER_INITIALIZED); 76 LAZY_INSTANCE_INITIALIZER;
77 77
78 ChromeBrowserMainPartsChromeos::ChromeBrowserMainPartsChromeos( 78 ChromeBrowserMainPartsChromeos::ChromeBrowserMainPartsChromeos(
79 const content::MainFunctionParams& parameters) 79 const content::MainFunctionParams& parameters)
80 : ChromeBrowserMainPartsLinux(parameters) { 80 : ChromeBrowserMainPartsLinux(parameters) {
81 } 81 }
82 82
83 ChromeBrowserMainPartsChromeos::~ChromeBrowserMainPartsChromeos() { 83 ChromeBrowserMainPartsChromeos::~ChromeBrowserMainPartsChromeos() {
84 // Shutdown the network change notifier for Chrome OS. The network 84 // Shutdown the network change notifier for Chrome OS. The network
85 // change notifier stops monitoring changes from the power manager and 85 // change notifier stops monitoring changes from the power manager and
86 // the network manager. 86 // the network manager.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // the network manager. 175 // the network manager.
176 chromeos::CrosNetworkChangeNotifierFactory::GetInstance()->Init(); 176 chromeos::CrosNetworkChangeNotifierFactory::GetInstance()->Init();
177 177
178 // For http://crosbug.com/p/5795 and http://crosbug.com/p/6245. 178 // For http://crosbug.com/p/5795 and http://crosbug.com/p/6245.
179 // Enable Num Lock on X start up. 179 // Enable Num Lock on X start up.
180 if (chromeos::system::runtime_environment::IsRunningOnChromeOS()) { 180 if (chromeos::system::runtime_environment::IsRunningOnChromeOS()) {
181 chromeos::input_method::InputMethodManager::GetInstance()->GetXKeyboard()-> 181 chromeos::input_method::InputMethodManager::GetInstance()->GetXKeyboard()->
182 SetNumLockEnabled(true); 182 SetNumLockEnabled(true);
183 } 183 }
184 } 184 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/boot_times_loader.cc ('k') | chrome/browser/chromeos/cros/onc_network_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698