gpu: Tweak Android WebGL test expectations
[chromium-blink-merge.git] / ui / linux_ui / status_icon_linux.h
blobfbbf28f304e5bc2e00b36e5f06c9e03856528e60
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"
11 namespace gfx {
12 class ImageSkia;
15 namespace ui {
16 class MenuModel;
17 } // namespace ui
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 {
24 public:
25 class Delegate {
26 public:
27 virtual void OnClick() = 0;
28 virtual bool HasClickAction() = 0;
30 protected:
31 virtual ~Delegate();
34 StatusIconLinux();
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; }
49 private:
50 Delegate* delegate_;
53 #endif // UI_LINUX_UI_STATUS_ICON_LINUX_H_