| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser_init.h" | 5 #include "chrome/browser/browser_init.h" |
| 6 | 6 |
| 7 #include <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 if (return_code) | 396 if (return_code) |
| 397 *return_code = ResultCodes::INVALID_CMDLINE_URL; | 397 *return_code = ResultCodes::INVALID_CMDLINE_URL; |
| 398 return false; | 398 return false; |
| 399 } | 399 } |
| 400 | 400 |
| 401 #if defined(OS_CHROMEOS) | 401 #if defined(OS_CHROMEOS) |
| 402 // Create the WmMessageListener so that it can listen for messages regardless | 402 // Create the WmMessageListener so that it can listen for messages regardless |
| 403 // of what window has focus. | 403 // of what window has focus. |
| 404 chromeos::WmMessageListener::instance(); | 404 chromeos::WmMessageListener::instance(); |
| 405 | 405 |
| 406 // Create the SystemKeyEventListener so it can listen for system keyboard |
| 407 // messages regardless of focus. |
| 408 chromeos::SystemKeyEventListener::instance(); |
| 409 |
| 406 // Create the WmOverviewController so it can register with the listener. | 410 // Create the WmOverviewController so it can register with the listener. |
| 407 chromeos::WmOverviewController::instance(); | 411 chromeos::WmOverviewController::instance(); |
| 408 | 412 |
| 409 // Install the GView request interceptor that will redirect requests | 413 // Install the GView request interceptor that will redirect requests |
| 410 // of compatible documents (PDF, etc) to the GView document viewer. | 414 // of compatible documents (PDF, etc) to the GView document viewer. |
| 411 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 415 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
| 412 if (parsed_command_line.HasSwitch(switches::kEnableGView)) { | 416 if (parsed_command_line.HasSwitch(switches::kEnableGView)) { |
| 413 chromeos::GViewRequestInterceptor::GetGViewRequestInterceptor(); | 417 chromeos::GViewRequestInterceptor::GetGViewRequestInterceptor(); |
| 414 } | 418 } |
| 415 if (process_startup) { | 419 if (process_startup) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 434 chromeos::CrosLibrary::Get()->GetUpdateLibrary()->AddObserver( | 438 chromeos::CrosLibrary::Get()->GetUpdateLibrary()->AddObserver( |
| 435 update_observer); | 439 update_observer); |
| 436 | 440 |
| 437 static chromeos::NetworkMessageObserver* network_message_observer = | 441 static chromeos::NetworkMessageObserver* network_message_observer = |
| 438 new chromeos::NetworkMessageObserver(profile); | 442 new chromeos::NetworkMessageObserver(profile); |
| 439 chromeos::CrosLibrary::Get()->GetNetworkLibrary()->AddObserver( | 443 chromeos::CrosLibrary::Get()->GetNetworkLibrary()->AddObserver( |
| 440 network_message_observer); | 444 network_message_observer); |
| 441 | 445 |
| 442 chromeos::CrosLibrary::Get()->GetNetworkLibrary()->AddObserver( | 446 chromeos::CrosLibrary::Get()->GetNetworkLibrary()->AddObserver( |
| 443 chromeos::NetworkStateNotifier::Get()); | 447 chromeos::NetworkStateNotifier::Get()); |
| 444 | |
| 445 // Creates the SystemKeyEventListener to listen for keypress messages | |
| 446 // regardless of what window has focus. | |
| 447 chromeos::SystemKeyEventListener::instance(); | |
| 448 } | 448 } |
| 449 #endif | 449 #endif |
| 450 return true; | 450 return true; |
| 451 } | 451 } |
| 452 | 452 |
| 453 // Tab ------------------------------------------------------------------------ | 453 // Tab ------------------------------------------------------------------------ |
| 454 | 454 |
| 455 BrowserInit::LaunchWithProfile::Tab::Tab() : is_app(false), is_pinned(true) {} | 455 BrowserInit::LaunchWithProfile::Tab::Tab() : is_app(false), is_pinned(true) {} |
| 456 | 456 |
| 457 BrowserInit::LaunchWithProfile::Tab::~Tab() {} | 457 BrowserInit::LaunchWithProfile::Tab::~Tab() {} |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1022 scoped_refptr<AutomationProviderClass> automation = | 1022 scoped_refptr<AutomationProviderClass> automation = |
| 1023 new AutomationProviderClass(profile); | 1023 new AutomationProviderClass(profile); |
| 1024 automation->ConnectToChannel(channel_id); | 1024 automation->ConnectToChannel(channel_id); |
| 1025 automation->SetExpectedTabCount(expected_tabs); | 1025 automation->SetExpectedTabCount(expected_tabs); |
| 1026 | 1026 |
| 1027 AutomationProviderList* list = | 1027 AutomationProviderList* list = |
| 1028 g_browser_process->InitAutomationProviderList(); | 1028 g_browser_process->InitAutomationProviderList(); |
| 1029 DCHECK(list); | 1029 DCHECK(list); |
| 1030 list->AddProvider(automation); | 1030 list->AddProvider(automation); |
| 1031 } | 1031 } |
| OLD | NEW |