Updates the mic icon status based on the device's audio state (2nd)
[chromium-blink-merge.git] / chrome / browser / chromeos / ui / idle_app_name_notification_view.h
blob7fd0cc9421f7925e8b957ee9efcfb8f79aaebc38
1 // Copyright 2014 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 CHROME_BROWSER_CHROMEOS_UI_IDLE_APP_NAME_NOTIFICATION_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_UI_IDLE_APP_NAME_NOTIFICATION_VIEW_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string16.h"
11 namespace extensions {
12 class Extension;
13 } // namespace extensions
15 namespace views {
16 class Widget;
17 } // namespace views
19 namespace chromeos {
21 class IdleAppNameNotificationDelegateView;
23 // A class which creates a message which shows the currently running applicaion
24 // name and its creator.
25 class IdleAppNameNotificationView {
26 public:
27 // |message_visibility_time_in_ms| is the time the message is fully visible.
28 // |animation_time_ms| is the transition time for the message to show or hide.
29 // |extension| is the application which is started.
30 IdleAppNameNotificationView(int message_visibility_time_in_ms,
31 int animation_time_ms,
32 const extensions::Extension* extension);
33 virtual ~IdleAppNameNotificationView();
35 // Close and destroy the message instantly.
36 void CloseMessage();
38 // Returns true when message is shown.
39 bool IsVisible();
41 // Returns the shown text for testing.
42 base::string16 GetShownTextForTest();
44 private:
45 // Show the message. This will make the message visible.
46 void ShowMessage(int message_visibility_time_in_ms,
47 int animation_time_ms,
48 const extensions::Extension* extension);
50 // A reference to an existing message.
51 IdleAppNameNotificationDelegateView* view_;
53 DISALLOW_COPY_AND_ASSIGN(IdleAppNameNotificationView);
56 } // namespace chromeos
58 #endif // CHROME_BROWSER_CHROMEOS_UI_IDLE_APP_NAME_NOTIFICATION_VIEW_H_