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

Unified Diff: chrome/browser/gtk/notifications/notification_options_menu_model.h

Issue 3013012: Revert 52859. (Closed)
Patch Set: Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/gtk/notifications/notification_options_menu_model.h
diff --git a/chrome/browser/gtk/notifications/notification_options_menu_model.h b/chrome/browser/gtk/notifications/notification_options_menu_model.h
new file mode 100644
index 0000000000000000000000000000000000000000..a88adb76fd8112b696d037f4f9a1f4bd34d45dff
--- /dev/null
+++ b/chrome/browser/gtk/notifications/notification_options_menu_model.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2010 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 CHROME_BROWSER_GTK_NOTIFICATIONS_NOTIFICATION_OPTIONS_MENU_MODEL_H_
+#define CHROME_BROWSER_GTK_NOTIFICATIONS_NOTIFICATION_OPTIONS_MENU_MODEL_H_
+
+#include "app/menus/menu_model.h"
+
+class Balloon;
+
+// Model for the options menu on the notification balloon.
+class NotificationOptionsMenuModel : public menus::MenuModel {
+ public:
+ explicit NotificationOptionsMenuModel(Balloon* balloon);
+ ~NotificationOptionsMenuModel();
+
+ // menus::MenuModel methods.
+ virtual bool HasIcons() const;
+ virtual int GetItemCount() const;
+ virtual ItemType GetTypeAt(int index) const;
+ virtual int GetCommandIdAt(int index) const;
+ virtual string16 GetLabelAt(int index) const;
+ virtual bool IsLabelDynamicAt(int index) const;
+ virtual bool GetAcceleratorAt(int index,
+ menus::Accelerator* accelerator) const;
+ virtual bool IsItemCheckedAt(int index) const;
+ virtual int GetGroupIdAt(int index) const;
+ virtual bool GetIconAt(int index, SkBitmap* icon) const;
+ virtual menus::ButtonMenuItemModel* GetButtonMenuItemAt(int index) const;
+ virtual bool IsEnabledAt(int index) const;
+ virtual MenuModel* GetSubmenuModelAt(int index) const;
+ virtual void HighlightChangedTo(int index);
+ virtual void ActivatedAt(int index);
+
+ private:
+ // Non-owned pointer to the balloon involved.
+ Balloon* balloon_;
+
+ DISALLOW_COPY_AND_ASSIGN(NotificationOptionsMenuModel);
+};
+
+#endif // CHROME_BROWSER_GTK_NOTIFICATIONS_NOTIFICATION_OPTIONS_MENU_MODEL_H_

Powered by Google App Engine
This is Rietveld 408576698