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 UI_LINUX_UI_STATUS_ICON_LINUX_H_
6 #define UI_LINUX_UI_STATUS_ICON_LINUX_H_
8 #include "base/strings/string16.h"
9 #include "ui/linux_ui/linux_ui_export.h"
19 // Since liblinux_ui cannot have dependencies on any chrome browser components
20 // we cannot inherit from StatusIcon. So we implement the necessary methods
21 // and let a wrapper class implement the StatusIcon interface and defer the
22 // callbacks to a delegate.
23 class LINUX_UI_EXPORT StatusIconLinux
{
27 virtual void OnClick() = 0;
28 virtual bool HasClickAction() = 0;
35 virtual ~StatusIconLinux();
37 virtual void SetImage(const gfx::ImageSkia
& image
) = 0;
38 virtual void SetPressedImage(const gfx::ImageSkia
& image
) = 0;
39 virtual void SetToolTip(const string16
& tool_tip
) = 0;
41 // Invoked after a call to SetContextMenu() to let the platform-specific
42 // subclass update the native context menu based on the new model. The
43 // subclass should destroy the existing native context menu on this call.
44 virtual void UpdatePlatformContextMenu(ui::MenuModel
* model
) = 0;
46 Delegate
* delegate() { return delegate_
; }
47 void set_delegate(Delegate
* delegate
) { delegate_
= delegate
; }
53 #endif // UI_LINUX_UI_STATUS_ICON_LINUX_H_