summaryrefslogtreecommitdiffstats
path: root/ash/system/tray_update.h
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-28 04:05:53 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-28 04:05:53 +0000
commit024a03b4bacbfee6d68e807aeb71146906369ff1 (patch)
treeff64b0b391f4f7b6bad4ff19fc6aecdd3be11507 /ash/system/tray_update.h
parent95f177a2874ccc0cc296366a0f3fb62b5698e8f0 (diff)
downloadchromium_src-024a03b4bacbfee6d68e807aeb71146906369ff1.zip
chromium_src-024a03b4bacbfee6d68e807aeb71146906369ff1.tar.gz
chromium_src-024a03b4bacbfee6d68e807aeb71146906369ff1.tar.bz2
ash: Move the update notifier into its own row in the popup.
BUG=120195,115357 TEST=none Review URL: https://chromiumcodereview.appspot.com/9844012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129363 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/tray_update.h')
-rw-r--r--ash/system/tray_update.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/ash/system/tray_update.h b/ash/system/tray_update.h
new file mode 100644
index 0000000..a2cac2e
--- /dev/null
+++ b/ash/system/tray_update.h
@@ -0,0 +1,49 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_SYSTEM_TRAY_UPDATE_H_
+#define ASH_SYSTEM_TRAY_UPDATE_H_
+#pragma once
+
+#include "ash/system/tray/tray_image_item.h"
+
+namespace views {
+class View;
+}
+
+namespace ash {
+
+class ASH_EXPORT UpdateObserver {
+ public:
+ virtual ~UpdateObserver() {}
+
+ virtual void OnUpdateRecommended() = 0;
+};
+
+namespace internal {
+
+class TrayUpdate : public TrayImageItem,
+ public UpdateObserver {
+ public:
+ TrayUpdate();
+ virtual ~TrayUpdate();
+
+ private:
+ // Overridden from TrayImageItem.
+ virtual bool GetInitialVisibility() OVERRIDE;
+ virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
+ virtual void DestroyDefaultView() OVERRIDE;
+
+ // Overridden from UpdateObserver.
+ virtual void OnUpdateRecommended() OVERRIDE;
+
+ scoped_ptr<views::View> default_;
+
+ DISALLOW_COPY_AND_ASSIGN(TrayUpdate);
+};
+
+} // namespace internal
+} // namespace ash
+
+#endif // ASH_SYSTEM_TRAY_UPDATE_H_