Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: chrome/browser/ui/ash/system_tray_client.h

Issue 2882933002: Add update available icon in system tray (Closed)
Patch Set: Delay RequestUpdateCheck until the aboutChromeOS page is loaded Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_
6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_ 6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_
7 7
8 #include "ash/public/interfaces/system_tray.mojom.h" 8 #include "ash/public/interfaces/system_tray.mojom.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "chrome/browser/chromeos/system/system_clock_observer.h" 10 #include "chrome/browser/chromeos/system/system_clock_observer.h"
11 #include "chromeos/dbus/update_engine_client.h"
11 #include "components/policy/core/common/cloud/cloud_policy_store.h" 12 #include "components/policy/core/common/cloud/cloud_policy_store.h"
12 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
15
14 #include "mojo/public/cpp/bindings/binding.h" 16 #include "mojo/public/cpp/bindings/binding.h"
15 17
16 namespace ash { 18 namespace ash {
17 enum class LoginStatus; 19 enum class LoginStatus;
18 } 20 }
19 21
20 namespace views { 22 namespace views {
21 class Widget; 23 class Widget;
22 class WidgetDelegate; 24 class WidgetDelegate;
23 } 25 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void SetPrimaryTrayVisible(bool visible); 59 void SetPrimaryTrayVisible(bool visible);
58 60
59 // ash::mojom::SystemTrayClient: 61 // ash::mojom::SystemTrayClient:
60 void ShowSettings() override; 62 void ShowSettings() override;
61 void ShowBluetoothSettings() override; 63 void ShowBluetoothSettings() override;
62 void ShowBluetoothPairingDialog(const std::string& address, 64 void ShowBluetoothPairingDialog(const std::string& address,
63 const base::string16& name_for_display, 65 const base::string16& name_for_display,
64 bool paired, 66 bool paired,
65 bool connected) override; 67 bool connected) override;
66 void ShowDateSettings() override; 68 void ShowDateSettings() override;
69 void ShowAboutChromeOS() override;
67 void ShowSetTimeDialog() override; 70 void ShowSetTimeDialog() override;
68 void ShowDisplaySettings() override; 71 void ShowDisplaySettings() override;
69 void ShowPowerSettings() override; 72 void ShowPowerSettings() override;
70 void ShowChromeSlow() override; 73 void ShowChromeSlow() override;
71 void ShowIMESettings() override; 74 void ShowIMESettings() override;
72 void ShowHelp() override; 75 void ShowHelp() override;
73 void ShowAccessibilityHelp() override; 76 void ShowAccessibilityHelp() override;
74 void ShowAccessibilitySettings() override; 77 void ShowAccessibilitySettings() override;
75 void ShowPaletteHelp() override; 78 void ShowPaletteHelp() override;
76 void ShowPaletteSettings() override; 79 void ShowPaletteSettings() override;
77 void ShowPublicAccountInfo() override; 80 void ShowPublicAccountInfo() override;
78 void ShowEnterpriseInfo() override; 81 void ShowEnterpriseInfo() override;
79 void ShowNetworkConfigure(const std::string& network_id) override; 82 void ShowNetworkConfigure(const std::string& network_id) override;
80 void ShowNetworkCreate(const std::string& type) override; 83 void ShowNetworkCreate(const std::string& type) override;
81 void ShowThirdPartyVpnCreate(const std::string& extension_id) override; 84 void ShowThirdPartyVpnCreate(const std::string& extension_id) override;
82 void ShowNetworkSettings(const std::string& network_id) override; 85 void ShowNetworkSettings(const std::string& network_id) override;
83 void ShowProxySettings() override; 86 void ShowProxySettings() override;
84 void SignOut() override; 87 void SignOut() override;
85 void RequestRestartForUpdate() override; 88 void RequestRestartForUpdate() override;
89 void ScheduleRequestUpdateCheck() override;
86 90
87 private: 91 private:
88 // Helper function shared by ShowNetworkSettings() and ShowNetworkConfigure(). 92 // Helper function shared by ShowNetworkSettings() and ShowNetworkConfigure().
89 void ShowNetworkSettingsHelper(const std::string& network_id, 93 void ShowNetworkSettingsHelper(const std::string& network_id,
90 bool show_configure); 94 bool show_configure);
91 95
92 // Requests that ash show the update available icon. 96 // Requests that ash show the update available icon.
93 void HandleUpdateAvailable(); 97 void HandleUpdateAvailable();
94 98
99 // Requests that ash show the update over cellular available icon.
100 void HandleUpdateOverCellularAvailable();
101
95 // chromeos::system::SystemClockObserver: 102 // chromeos::system::SystemClockObserver:
96 void OnSystemClockChanged(chromeos::system::SystemClock* clock) override; 103 void OnSystemClockChanged(chromeos::system::SystemClock* clock) override;
97 104
98 // policy::CloudPolicyStore::Observer 105 // policy::CloudPolicyStore::Observer
99 void OnStoreLoaded(policy::CloudPolicyStore* store) override; 106 void OnStoreLoaded(policy::CloudPolicyStore* store) override;
100 void OnStoreError(policy::CloudPolicyStore* store) override; 107 void OnStoreError(policy::CloudPolicyStore* store) override;
101 108
102 void UpdateEnterpriseDomain(); 109 void UpdateEnterpriseDomain();
103 110
111 // Attempts to check for update;
112 void RequestUpdateCheck();
113
114 void OnRequestUpdateCheck(
115 chromeos::UpdateEngineClient::UpdateCheckResult result);
116
104 // content::NotificationObserver: 117 // content::NotificationObserver:
105 void Observe(int type, 118 void Observe(int type,
106 const content::NotificationSource& source, 119 const content::NotificationSource& source,
107 const content::NotificationDetails& details) override; 120 const content::NotificationDetails& details) override;
108 121
109 // System tray mojo service in ash. 122 // System tray mojo service in ash.
110 ash::mojom::SystemTrayPtr system_tray_; 123 ash::mojom::SystemTrayPtr system_tray_;
111 124
112 // Binds this object to the client interface. 125 // Binds this object to the client interface.
113 mojo::Binding<ash::mojom::SystemTrayClient> binding_; 126 mojo::Binding<ash::mojom::SystemTrayClient> binding_;
114 127
115 // Whether an Adobe Flash component update is available. 128 // Whether an Adobe Flash component update is available.
116 bool flash_update_available_ = false; 129 bool flash_update_available_ = false;
117 130
118 // Avoid sending ash an empty enterprise domain at startup and suppress 131 // Avoid sending ash an empty enterprise domain at startup and suppress
119 // duplicate IPCs during the session. 132 // duplicate IPCs during the session.
120 std::string last_enterprise_domain_; 133 std::string last_enterprise_domain_;
121 bool last_active_directory_managed_ = false; 134 bool last_active_directory_managed_ = false;
122 135
123 content::NotificationRegistrar registrar_; 136 content::NotificationRegistrar registrar_;
124 137
125 DISALLOW_COPY_AND_ASSIGN(SystemTrayClient); 138 DISALLOW_COPY_AND_ASSIGN(SystemTrayClient);
126 }; 139 };
127 140
128 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_ 141 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698