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/ui/browser_init.h" | 5 #include "chrome/browser/ui/browser_init.h" |
6 | 6 |
7 #include <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 // preferences to work in the guest mode, the initialization has to be | 548 // preferences to work in the guest mode, the initialization has to be |
549 // done after |profile| is switched to the incognito profile (which | 549 // done after |profile| is switched to the incognito profile (which |
550 // is actually GuestSessionProfile in the guest mode). See the | 550 // is actually GuestSessionProfile in the guest mode). See the |
551 // GetOffTheRecordProfile() call above. | 551 // GetOffTheRecordProfile() call above. |
552 profile->InitChromeOSPreferences(); | 552 profile->InitChromeOSPreferences(); |
553 | 553 |
554 // Create the WmMessageListener so that it can listen for messages regardless | 554 // Create the WmMessageListener so that it can listen for messages regardless |
555 // of what window has focus. | 555 // of what window has focus. |
556 chromeos::WmMessageListener::GetInstance(); | 556 chromeos::WmMessageListener::GetInstance(); |
557 | 557 |
558 // Install the GView request interceptor that will redirect requests | |
559 // of compatible documents (PDF, etc) to the GView document viewer. | |
560 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | |
561 if (parsed_command_line.HasSwitch(switches::kEnableGView)) { | |
562 chromeos::GViewRequestInterceptor::GetInstance(); | |
563 } | |
564 if (process_startup) { | 558 if (process_startup) { |
565 // This observer is a singleton. It is never deleted but the pointer is kept | 559 // This observer is a singleton. It is never deleted but the pointer is kept |
566 // in a static so that it isn't reported as a leak. | 560 // in a static so that it isn't reported as a leak. |
567 static chromeos::LowBatteryObserver* low_battery_observer = | 561 static chromeos::LowBatteryObserver* low_battery_observer = |
568 new chromeos::LowBatteryObserver(profile); | 562 new chromeos::LowBatteryObserver(profile); |
569 chromeos::CrosLibrary::Get()->GetPowerLibrary()->AddObserver( | 563 chromeos::CrosLibrary::Get()->GetPowerLibrary()->AddObserver( |
570 low_battery_observer); | 564 low_battery_observer); |
571 | 565 |
572 static chromeos::UpdateObserver* update_observer = | 566 static chromeos::UpdateObserver* update_observer = |
573 new chromeos::UpdateObserver(profile); | 567 new chromeos::UpdateObserver(profile); |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1425 return false; | 1419 return false; |
1426 automation->SetExpectedTabCount(expected_tabs); | 1420 automation->SetExpectedTabCount(expected_tabs); |
1427 | 1421 |
1428 AutomationProviderList* list = | 1422 AutomationProviderList* list = |
1429 g_browser_process->InitAutomationProviderList(); | 1423 g_browser_process->InitAutomationProviderList(); |
1430 DCHECK(list); | 1424 DCHECK(list); |
1431 list->AddProvider(automation); | 1425 list->AddProvider(automation); |
1432 | 1426 |
1433 return true; | 1427 return true; |
1434 } | 1428 } |
OLD | NEW |