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 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1370 } | 1370 } |
1371 | 1371 |
1372 #if defined(OS_CHROMEOS) | 1372 #if defined(OS_CHROMEOS) |
1373 // The browser will be launched after the user logs in. | 1373 // The browser will be launched after the user logs in. |
1374 if (command_line.HasSwitch(switches::kLoginManager) || | 1374 if (command_line.HasSwitch(switches::kLoginManager) || |
1375 command_line.HasSwitch(switches::kLoginPassword)) { | 1375 command_line.HasSwitch(switches::kLoginPassword)) { |
1376 silent_launch = true; | 1376 silent_launch = true; |
1377 } | 1377 } |
1378 #endif | 1378 #endif |
1379 | 1379 |
1380 #if defined(HAVE_XINPUT2) && defined(TOUCH_UI) | 1380 #if defined(TOUCH_UI) |
1381 // Get a list of pointer-devices that should be treated as touch-devices. | 1381 // Get a list of pointer-devices that should be treated as touch-devices. |
1382 // TODO(sad): Instead of/in addition to getting the list from the | 1382 // TODO(sad): Instead of/in addition to getting the list from the |
1383 // command-line, query X for a list of touch devices. | 1383 // command-line, query X for a list of touch devices. |
1384 std::string touch_devices = | 1384 std::string touch_devices = |
1385 command_line.GetSwitchValueASCII(switches::kTouchDevices); | 1385 command_line.GetSwitchValueASCII(switches::kTouchDevices); |
1386 | 1386 |
1387 if (!touch_devices.empty()) { | 1387 if (!touch_devices.empty()) { |
1388 std::vector<std::string> devs; | 1388 std::vector<std::string> devs; |
1389 std::vector<unsigned int> device_ids; | 1389 std::vector<unsigned int> device_ids; |
1390 unsigned int devid; | 1390 unsigned int devid; |
(...skipping 30 matching lines...) Expand all Loading... |
1421 return false; | 1421 return false; |
1422 automation->SetExpectedTabCount(expected_tabs); | 1422 automation->SetExpectedTabCount(expected_tabs); |
1423 | 1423 |
1424 AutomationProviderList* list = | 1424 AutomationProviderList* list = |
1425 g_browser_process->InitAutomationProviderList(); | 1425 g_browser_process->InitAutomationProviderList(); |
1426 DCHECK(list); | 1426 DCHECK(list); |
1427 list->AddProvider(automation); | 1427 list->AddProvider(automation); |
1428 | 1428 |
1429 return true; | 1429 return true; |
1430 } | 1430 } |
OLD | NEW |