| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 #include "chrome/browser/chromeos/enterprise_extension_observer.h" | 91 #include "chrome/browser/chromeos/enterprise_extension_observer.h" |
| 92 #include "chrome/browser/chromeos/gview_request_interceptor.h" | 92 #include "chrome/browser/chromeos/gview_request_interceptor.h" |
| 93 #include "chrome/browser/chromeos/low_battery_observer.h" | 93 #include "chrome/browser/chromeos/low_battery_observer.h" |
| 94 #include "chrome/browser/chromeos/network_message_observer.h" | 94 #include "chrome/browser/chromeos/network_message_observer.h" |
| 95 #include "chrome/browser/chromeos/network_state_notifier.h" | 95 #include "chrome/browser/chromeos/network_state_notifier.h" |
| 96 #include "chrome/browser/chromeos/sms_observer.h" | 96 #include "chrome/browser/chromeos/sms_observer.h" |
| 97 #include "chrome/browser/chromeos/update_observer.h" | 97 #include "chrome/browser/chromeos/update_observer.h" |
| 98 #include "chrome/browser/chromeos/wm_message_listener.h" | 98 #include "chrome/browser/chromeos/wm_message_listener.h" |
| 99 #endif | 99 #endif |
| 100 | 100 |
| 101 #if defined(HAVE_XINPUT2) | 101 #if defined(TOUCH_UI) |
| 102 #include "views/focus/accelerator_handler.h" | 102 #include "views/focus/accelerator_handler.h" |
| 103 #endif | 103 #endif |
| 104 | 104 |
| 105 namespace { | 105 namespace { |
| 106 | 106 |
| 107 // SetAsDefaultBrowserTask ---------------------------------------------------- | 107 // SetAsDefaultBrowserTask ---------------------------------------------------- |
| 108 | 108 |
| 109 class SetAsDefaultBrowserTask : public Task { | 109 class SetAsDefaultBrowserTask : public Task { |
| 110 public: | 110 public: |
| 111 SetAsDefaultBrowserTask(); | 111 SetAsDefaultBrowserTask(); |
| (...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1386 } | 1386 } |
| 1387 | 1387 |
| 1388 #if defined(OS_CHROMEOS) | 1388 #if defined(OS_CHROMEOS) |
| 1389 // The browser will be launched after the user logs in. | 1389 // The browser will be launched after the user logs in. |
| 1390 if (command_line.HasSwitch(switches::kLoginManager) || | 1390 if (command_line.HasSwitch(switches::kLoginManager) || |
| 1391 command_line.HasSwitch(switches::kLoginPassword)) { | 1391 command_line.HasSwitch(switches::kLoginPassword)) { |
| 1392 silent_launch = true; | 1392 silent_launch = true; |
| 1393 } | 1393 } |
| 1394 #endif | 1394 #endif |
| 1395 | 1395 |
| 1396 #if defined(HAVE_XINPUT2) && defined(TOUCH_UI) | 1396 #if defined(TOUCH_UI) |
| 1397 // Get a list of pointer-devices that should be treated as touch-devices. | 1397 // Get a list of pointer-devices that should be treated as touch-devices. |
| 1398 // TODO(sad): Instead of/in addition to getting the list from the | 1398 // TODO(sad): Instead of/in addition to getting the list from the |
| 1399 // command-line, query X for a list of touch devices. | 1399 // command-line, query X for a list of touch devices. |
| 1400 std::string touch_devices = | 1400 std::string touch_devices = |
| 1401 command_line.GetSwitchValueASCII(switches::kTouchDevices); | 1401 command_line.GetSwitchValueASCII(switches::kTouchDevices); |
| 1402 | 1402 |
| 1403 if (!touch_devices.empty()) { | 1403 if (!touch_devices.empty()) { |
| 1404 std::vector<std::string> devs; | 1404 std::vector<std::string> devs; |
| 1405 std::vector<unsigned int> device_ids; | 1405 std::vector<unsigned int> device_ids; |
| 1406 unsigned int devid; | 1406 unsigned int devid; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1437 return false; | 1437 return false; |
| 1438 automation->SetExpectedTabCount(expected_tabs); | 1438 automation->SetExpectedTabCount(expected_tabs); |
| 1439 | 1439 |
| 1440 AutomationProviderList* list = | 1440 AutomationProviderList* list = |
| 1441 g_browser_process->InitAutomationProviderList(); | 1441 g_browser_process->InitAutomationProviderList(); |
| 1442 DCHECK(list); | 1442 DCHECK(list); |
| 1443 list->AddProvider(automation); | 1443 list->AddProvider(automation); |
| 1444 | 1444 |
| 1445 return true; | 1445 return true; |
| 1446 } | 1446 } |
| OLD | NEW |