ProfilePolicyConnectorFactory: Refactoring from Profile to BrowserContext.
[chromium-blink-merge.git] / ash / system / chromeos / tray_tracing.h
blobf036a8cb9e3d04661b0ae2fd8bce10c76706029c
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ASH_SYSTEM_TRAY_TRACING_H_
6 #define ASH_SYSTEM_TRAY_TRACING_H_
8 #include "ash/ash_export.h"
9 #include "ash/system/tray/tray_image_item.h"
11 namespace views {
12 class View;
15 namespace ash {
17 class ASH_EXPORT TracingObserver {
18 public:
19 virtual ~TracingObserver() {}
21 // Notifies when tracing mode changes.
22 virtual void OnTracingModeChanged(bool value) = 0;
25 // This is the item that displays when users enable performance tracing at
26 // chrome://slow. It alerts them that this mode is running, and provides an
27 // easy way to open the page to disable it.
28 class TrayTracing : public TrayImageItem,
29 public TracingObserver {
30 public:
31 explicit TrayTracing(SystemTray* system_tray);
32 ~TrayTracing() override;
34 private:
35 void SetTrayIconVisible(bool visible);
37 // Overridden from TrayImageItem.
38 bool GetInitialVisibility() override;
39 views::View* CreateDefaultView(user::LoginStatus status) override;
40 views::View* CreateDetailedView(user::LoginStatus status) override;
41 void DestroyDefaultView() override;
42 void DestroyDetailedView() override;
44 // Overridden from TracingObserver.
45 void OnTracingModeChanged(bool value) override;
47 views::View* default_;
49 DISALLOW_COPY_AND_ASSIGN(TrayTracing);
52 } // namespace ash
54 #endif // ASH_SYSTEM_TRAY_TRACING_H_