summaryrefslogtreecommitdiffstats
path: root/chromium/ui/views/linux_ui/linux_ui.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/views/linux_ui/linux_ui.h')
-rw-r--r--chromium/ui/views/linux_ui/linux_ui.h52
1 files changed, 48 insertions, 4 deletions
diff --git a/chromium/ui/views/linux_ui/linux_ui.h b/chromium/ui/views/linux_ui/linux_ui.h
index 152b364282d..b5466f57ef5 100644
--- a/chromium/ui/views/linux_ui/linux_ui.h
+++ b/chromium/ui/views/linux_ui/linux_ui.h
@@ -5,15 +5,25 @@
#ifndef UI_VIEWS_LINUX_UI_LINUX_UI_H_
#define UI_VIEWS_LINUX_UI_LINUX_UI_H_
+#include <string>
+
+#include "base/callback.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/ime/linux/linux_input_method_context_factory.h"
+#include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h"
+#include "ui/gfx/linux_font_delegate.h"
#include "ui/shell_dialogs/linux_shell_dialog.h"
+#include "ui/views/controls/button/button.h"
#include "ui/views/linux_ui/status_icon_linux.h"
#include "ui/views/views_export.h"
// The main entrypoint into Linux toolkit specific code. GTK code should only
// be executed behind this interface.
+namespace aura {
+class Window;
+}
+
namespace gfx {
class Image;
}
@@ -23,6 +33,10 @@ class NativeTheme;
}
namespace views {
+class Border;
+class LabelButton;
+class LabelButtonBorder;
+class View;
class WindowButtonOrderObserver;
// Adapter class with targets to render like different toolkits. Set by any
@@ -33,8 +47,22 @@ class WindowButtonOrderObserver;
// complex method that pokes around with dlopen against a libuigtk2.so, a
// liuigtk3.so, etc.
class VIEWS_EXPORT LinuxUI : public ui::LinuxInputMethodContextFactory,
- public ui::LinuxShellDialog {
+ public gfx::LinuxFontDelegate,
+ public ui::LinuxShellDialog,
+ public ui::TextEditKeyBindingsDelegateAuraLinux {
public:
+ // Describes the window management actions that could be taken in response to
+ // a middle click in the non client area.
+ enum NonClientMiddleClickAction {
+ MIDDLE_CLICK_ACTION_NONE,
+ MIDDLE_CLICK_ACTION_LOWER,
+ MIDDLE_CLICK_ACTION_MINIMIZE,
+ MIDDLE_CLICK_ACTION_TOGGLE_MAXIMIZE
+ };
+
+ typedef base::Callback<ui::NativeTheme*(aura::Window* window)>
+ NativeThemeGetter;
+
virtual ~LinuxUI() {}
// Sets the dynamically loaded singleton that draws the desktop native UI.
@@ -67,9 +95,10 @@ class VIEWS_EXPORT LinuxUI : public ui::LinuxInputMethodContextFactory,
// Returns a NativeTheme that will provide system colors and draw system
// style widgets.
- virtual ui::NativeTheme* GetNativeTheme() const = 0;
+ virtual ui::NativeTheme* GetNativeTheme(aura::Window* window) const = 0;
- virtual void SetUseSystemTheme(bool use_system_theme) = 0;
+ // Used to set an override NativeTheme.
+ virtual void SetNativeThemeOverride(const NativeThemeGetter& callback) = 0;
// Returns whether we should be using the native theme provided by this
// object by default.
@@ -86,7 +115,7 @@ class VIEWS_EXPORT LinuxUI : public ui::LinuxInputMethodContextFactory,
// Create a native status icon.
virtual scoped_ptr<StatusIconLinux> CreateLinuxStatusIcon(
const gfx::ImageSkia& image,
- const string16& tool_tip) const = 0;
+ const base::string16& tool_tip) const = 0;
// Returns the icon for a given content type from the icon theme.
// TODO(davidben): Add an observer for the theme changing, so we can drop the
@@ -94,6 +123,11 @@ class VIEWS_EXPORT LinuxUI : public ui::LinuxInputMethodContextFactory,
virtual gfx::Image GetIconForContentType(
const std::string& content_type, int size) const = 0;
+ // Builds a Border which paints the native button style.
+ virtual scoped_ptr<Border> CreateNativeBorder(
+ views::LabelButton* owning_button,
+ scoped_ptr<views::LabelButtonBorder> border) = 0;
+
// Notifies the observer about changes about how window buttons should be
// laid out. If the order is anything other than the default min,max,close on
// the right, will immediately send a button change event to the observer.
@@ -106,6 +140,16 @@ class VIEWS_EXPORT LinuxUI : public ui::LinuxInputMethodContextFactory,
// Determines whether the user's window manager is Unity.
virtual bool UnityIsRunning() = 0;
+
+ // What action we should take when the user middle clicks on non-client
+ // area. The default is lowering the window.
+ virtual NonClientMiddleClickAction GetNonClientMiddleClickAction() = 0;
+
+ // Notifies the window manager that start up has completed.
+ // Normally Chromium opens a new window on startup and GTK does this
+ // automatically. In case Chromium does not open a new window on startup,
+ // e.g. an existing browser window already exists, this should be called.
+ virtual void NotifyWindowManagerStartupComplete() = 0;
};
} // namespace views