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

Unified Diff: chrome/browser/ui/ash/system_tray_client.h

Issue 2558043006: ash: Use system tray mojo interface to show system update tray icon (Closed)
Patch Set: fix gcc Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/ash/system_tray_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/system_tray_client.h
diff --git a/chrome/browser/ui/ash/system_tray_client.h b/chrome/browser/ui/ash/system_tray_client.h
index 82e82dfd410eae6f4b9bdd6e56bc534872d37bdd..6ea72c3bea50b34f92569d54f753e6a9080a799b 100644
--- a/chrome/browser/ui/ash/system_tray_client.h
+++ b/chrome/browser/ui/ash/system_tray_client.h
@@ -8,6 +8,8 @@
#include "ash/public/interfaces/system_tray.mojom.h"
#include "base/macros.h"
#include "chrome/browser/chromeos/system/system_clock_observer.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "mojo/public/cpp/bindings/binding.h"
namespace ash {
@@ -23,7 +25,8 @@ class WidgetDelegate;
// relevant state changes in chrome.
// TODO: Consider renaming this to SystemTrayClientChromeOS.
class SystemTrayClient : public ash::mojom::SystemTrayClient,
- public chromeos::system::SystemClockObserver {
+ public chromeos::system::SystemClockObserver,
+ public content::NotificationObserver {
public:
SystemTrayClient();
~SystemTrayClient() override;
@@ -43,6 +46,10 @@ class SystemTrayClient : public ash::mojom::SystemTrayClient,
static views::Widget* CreateUnownedDialogWidget(
views::WidgetDelegate* widget_delegate);
+ // Shows an update icon for an Adobe Flash update and forces a device reboot
+ // when the update is applied.
+ void SetFlashUpdateAvailable();
+
// ash::mojom::SystemTrayClient:
void ShowSettings() override;
void ShowDateSettings() override;
@@ -66,15 +73,28 @@ class SystemTrayClient : public ash::mojom::SystemTrayClient,
void RequestRestartForUpdate() override;
private:
+ // Requests that ash show the update available icon.
+ void HandleUpdateAvailable();
+
// chromeos::system::SystemClockObserver:
void OnSystemClockChanged(chromeos::system::SystemClock* clock) override;
+ // content::NotificationObserver:
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
+
// System tray mojo service in ash.
ash::mojom::SystemTrayPtr system_tray_;
// Binds this object to the client interface.
mojo::Binding<ash::mojom::SystemTrayClient> binding_;
+ // Whether an Adobe Flash component update is available.
+ bool flash_update_available_ = false;
+
+ content::NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(SystemTrayClient);
};
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/ash/system_tray_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698