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

Unified Diff: ash/common/system/tray/system_tray_controller.h

Issue 2525813004: chromeos: Introduce SetClient() on ash::mojom::SystemTray interface (Closed)
Patch Set: remove logging Created 4 years, 1 month 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 | « no previous file | ash/common/system/tray/system_tray_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/system_tray_controller.h
diff --git a/ash/common/system/tray/system_tray_controller.h b/ash/common/system/tray/system_tray_controller.h
index 81838581477f3d3a23cecc18839d6bb55d4bcffb..eda45914a354e184d566a628a68cbdc34c0382ae 100644
--- a/ash/common/system/tray/system_tray_controller.h
+++ b/ash/common/system/tray/system_tray_controller.h
@@ -12,29 +12,21 @@
#include "base/macros.h"
#include "mojo/public/cpp/bindings/binding_set.h"
-namespace service_manager {
-class Connector;
-}
-
namespace ash {
// Both implements mojom::SystemTray and wraps the mojom::SystemTrayClient
-// interface. The wrapper makes the initial connection and handles reconnecting
-// on error. Implements both because it caches state pushed down from the
+// interface. Implements both because it caches state pushed down from the
// browser process via SystemTray so it can be synchronously queried inside ash.
//
// Conceptually similar to historical ash-to-chrome interfaces like
// SystemTrayDelegate. Lives on the main thread.
//
-// Only connects to the actual mojom::SystemTrayClient interface when running on
-// Chrome OS. In tests and on Windows all operations are no-ops.
-//
// TODO: Consider renaming this to SystemTrayClient or renaming the current
// SystemTray to SystemTrayView and making this class SystemTray.
class ASH_EXPORT SystemTrayController
: NON_EXPORTED_BASE(public mojom::SystemTray) {
public:
- explicit SystemTrayController(service_manager::Connector* connector);
+ SystemTrayController();
~SystemTrayController() override;
base::HourClockType hour_clock_type() const { return hour_clock_type_; }
@@ -65,19 +57,10 @@ class ASH_EXPORT SystemTrayController
void BindRequest(mojom::SystemTrayRequest request);
private:
- // Connects or reconnects to the mojom::SystemTrayClient interface when
- // running on Chrome OS. Otherwise does nothing. Returns true if connected.
- bool ConnectToSystemTrayClient();
-
- // Handles errors on the |system_tray_client_| interface connection.
- void OnClientConnectionError();
-
// mojom::SystemTray:
+ void SetClient(mojom::SystemTrayClientPtr client) override;
void SetUse24HourClock(bool use_24_hour) override;
- // May be null in unit tests.
- service_manager::Connector* connector_;
-
// Client interface in chrome browser. Only bound on Chrome OS.
mojom::SystemTrayClientPtr system_tray_client_;
« no previous file with comments | « no previous file | ash/common/system/tray/system_tray_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698