Chromium Code Reviews| Index: chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h |
| diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h b/chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..df1156dabd6058f85b510f7d7b185398e9766739 |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h |
| @@ -0,0 +1,45 @@ |
| +// Copyright (c) 2013 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_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_ |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "chrome/browser/status_icons/desktop_notification_balloon.h" |
| +#include "chrome/browser/status_icons/status_icon.h" |
| +#include "ui/linux_ui/linux_ui.h" |
| + |
| +class StatusIconLinuxWrapper : public StatusIcon, |
| + public StatusIconLinux::Delegate { |
| + public: |
| + explicit StatusIconLinuxWrapper(StatusIconLinux* status_icon); |
| + |
| + // StatusIcon overrides: |
| + virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE; |
| + virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE; |
| + virtual void SetToolTip(const string16& tool_tip) OVERRIDE; |
| + virtual void SetClickActionLabel(const string16& label) OVERRIDE; |
| + virtual void DisplayBalloon(const gfx::ImageSkia& icon, |
| + const string16& title, |
| + const string16& contents) OVERRIDE; |
| + |
| + // StatusIconLinux::Delegate overrides: |
| + virtual void OnClick() OVERRIDE; |
| + |
| + static StatusIconLinuxWrapper* CreateWrappedStatusIcon(); |
|
Elliot Glaysher
2013/07/10 22:55:03
If this static constructor method is the prefered
sidharthms
2013/07/11 05:15:12
Done.
|
| + |
| + protected: |
| + // StatusIcon overrides: |
| + // Invoked after a call to SetContextMenu() to let the platform-specific |
| + // subclass update the native context menu based on the new model. If NULL is |
| + // passed, subclass should destroy the native context menu. |
| + virtual void UpdatePlatformContextMenu(ui::MenuModel* model) OVERRIDE; |
| + |
| + private: |
| + // Notification balloon. |
| + DesktopNotificationBalloon notification_; |
| + scoped_ptr<StatusIconLinux> status_icon_; |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_ |