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

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

Issue 2360143004: mash: Add SystemTrayClient interface, use to show date settings (Closed)
Patch Set: tweaks, similarity Created 4 years, 3 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_CONTROLLER_MUS_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_
6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CONTROLLER_MUS_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 "mojo/public/cpp/bindings/binding.h"
11 12
12 // Controls chrome's interaction with the ash system tray menu. 13 // Handles method calls delegated back to chrome from ash. Also notifies ash of
13 class SystemTrayControllerMus : public chromeos::system::SystemClockObserver { 14 // relevant state changes in chrome.
15 class SystemTrayClient : public ash::mojom::SystemTrayClient,
James Cook 2016/09/22 23:19:18 I went with this class being SystemTrayClient beca
sky 2016/09/23 16:42:26 What you have SGTM.
16 public chromeos::system::SystemClockObserver {
14 public: 17 public:
15 SystemTrayControllerMus(); 18 SystemTrayClient();
16 ~SystemTrayControllerMus() override; 19 ~SystemTrayClient() override;
17 20
18 private: 21 private:
22 // ash::mojom::SystemTrayClient:
23 void ShowDateSettings() override;
24
19 // chromeos::system::SystemClockObserver: 25 // chromeos::system::SystemClockObserver:
20 void OnSystemClockChanged(chromeos::system::SystemClock* clock) override; 26 void OnSystemClockChanged(chromeos::system::SystemClock* clock) override;
21 27
28 // System tray mojo service in ash.
22 ash::mojom::SystemTrayPtr system_tray_; 29 ash::mojom::SystemTrayPtr system_tray_;
23 30
24 DISALLOW_COPY_AND_ASSIGN(SystemTrayControllerMus); 31 // Binds the SystemTrayClient mojo interface to this object.
32 mojo::Binding<ash::mojom::SystemTrayClient> binding_;
James Cook 2016/09/22 23:19:18 Is this the right binding type?
sky 2016/09/23 16:42:26 The other one you could use is StrongBinding. Stro
33
34 DISALLOW_COPY_AND_ASSIGN(SystemTrayClient);
25 }; 35 };
26 36
27 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CONTROLLER_MUS_H_ 37 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698