OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ash/system_tray_client.h" | 5 #include "chrome/browser/ui/ash/system_tray_client.h" |
6 | 6 |
7 #include "ash/common/session/session_state_delegate.h" | 7 #include "ash/common/session/session_state_delegate.h" |
8 #include "ash/common/wm_shell.h" | 8 #include "ash/common/wm_shell.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/browser_process_platform_part.h" | 13 #include "chrome/browser/browser_process_platform_part.h" |
14 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 14 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
15 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 15 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
16 #include "chrome/browser/chromeos/options/network_config_view.h" | 16 #include "chrome/browser/chromeos/options/network_config_view.h" |
17 #include "chrome/browser/chromeos/system/system_clock.h" | 17 #include "chrome/browser/chromeos/system/system_clock.h" |
18 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
19 #include "chrome/browser/ui/ash/ash_util.h" | 19 #include "chrome/browser/ui/ash/ash_util.h" |
20 #include "chrome/browser/ui/chrome_pages.h" | 20 #include "chrome/browser/ui/chrome_pages.h" |
21 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" | 21 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
22 #include "chrome/browser/ui/singleton_tabs.h" | 22 #include "chrome/browser/ui/singleton_tabs.h" |
23 #include "chrome/common/url_constants.h" | 23 #include "chrome/common/url_constants.h" |
24 #include "chrome/grit/generated_resources.h" | 24 #include "chrome/grit/generated_resources.h" |
25 #include "chromeos/login/login_state.h" | 25 #include "chromeos/login/login_state.h" |
26 #include "content/public/browser/user_metrics.h" | 26 #include "content/public/browser/user_metrics.h" |
27 #include "content/public/common/service_manager_connection.h" | 27 #include "content/public/common/service_manager_connection.h" |
28 #include "net/base/escape.h" | 28 #include "net/base/escape.h" |
29 #include "services/shell/public/cpp/connector.h" | 29 #include "services/service_manager/public/cpp/connector.h" |
30 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
31 | 31 |
32 using chromeos::LoginState; | 32 using chromeos::LoginState; |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 const char kDisplaySettingsSubPageName[] = "display"; | 36 const char kDisplaySettingsSubPageName[] = "display"; |
37 const char kPaletteSettingsSubPageName[] = "stylus-overlay"; | 37 const char kPaletteSettingsSubPageName[] = "stylus-overlay"; |
38 | 38 |
39 SystemTrayClient* g_instance = nullptr; | 39 SystemTrayClient* g_instance = nullptr; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 connector->ConnectToInterface("service:content_browser", &system_tray_); | 198 connector->ConnectToInterface("service:content_browser", &system_tray_); |
199 | 199 |
200 // Tolerate ash crashing and coming back up. | 200 // Tolerate ash crashing and coming back up. |
201 system_tray_.set_connection_error_handler(base::Bind( | 201 system_tray_.set_connection_error_handler(base::Bind( |
202 &SystemTrayClient::OnClientConnectionError, base::Unretained(this))); | 202 &SystemTrayClient::OnClientConnectionError, base::Unretained(this))); |
203 } | 203 } |
204 | 204 |
205 void SystemTrayClient::OnClientConnectionError() { | 205 void SystemTrayClient::OnClientConnectionError() { |
206 system_tray_.reset(); | 206 system_tray_.reset(); |
207 } | 207 } |
OLD | NEW |