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

Side by Side Diff: ui/views/linux_ui/linux_ui.h

Issue 132023010: linux_aura: Fixes a couple of issues with the button border integration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: constant and braces Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/button/label_button_border.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_LINUX_UI_LINUX_UI_H_ 5 #ifndef UI_VIEWS_LINUX_UI_LINUX_UI_H_
6 #define UI_VIEWS_LINUX_UI_LINUX_UI_H_ 6 #define UI_VIEWS_LINUX_UI_LINUX_UI_H_
7 7
8 #include "third_party/skia/include/core/SkColor.h" 8 #include "third_party/skia/include/core/SkColor.h"
9 #include "ui/base/ime/linux/linux_input_method_context_factory.h" 9 #include "ui/base/ime/linux/linux_input_method_context_factory.h"
10 #include "ui/gfx/linux_font_delegate.h" 10 #include "ui/gfx/linux_font_delegate.h"
11 #include "ui/shell_dialogs/linux_shell_dialog.h" 11 #include "ui/shell_dialogs/linux_shell_dialog.h"
12 #include "ui/views/controls/button/button.h" 12 #include "ui/views/controls/button/button.h"
13 #include "ui/views/linux_ui/status_icon_linux.h" 13 #include "ui/views/linux_ui/status_icon_linux.h"
14 #include "ui/views/views_export.h" 14 #include "ui/views/views_export.h"
15 15
16 // The main entrypoint into Linux toolkit specific code. GTK code should only 16 // The main entrypoint into Linux toolkit specific code. GTK code should only
17 // be executed behind this interface. 17 // be executed behind this interface.
18 18
19 namespace gfx { 19 namespace gfx {
20 class Image; 20 class Image;
21 } 21 }
22 22
23 namespace ui { 23 namespace ui {
24 class NativeTheme; 24 class NativeTheme;
25 } 25 }
26 26
27 namespace views { 27 namespace views {
28 class Border; 28 class Border;
29 class CustomButton; 29 class LabelButton;
30 class View; 30 class View;
31 class WindowButtonOrderObserver; 31 class WindowButtonOrderObserver;
32 32
33 // Adapter class with targets to render like different toolkits. Set by any 33 // Adapter class with targets to render like different toolkits. Set by any
34 // project that wants to do linux desktop native rendering. 34 // project that wants to do linux desktop native rendering.
35 // 35 //
36 // TODO(erg): We're hardcoding GTK2, when we'll need to have backends for (at 36 // TODO(erg): We're hardcoding GTK2, when we'll need to have backends for (at
37 // minimum) GTK2 and GTK3. LinuxUI::instance() should actually be a very 37 // minimum) GTK2 and GTK3. LinuxUI::instance() should actually be a very
38 // complex method that pokes around with dlopen against a libuigtk2.so, a 38 // complex method that pokes around with dlopen against a libuigtk2.so, a
39 // liuigtk3.so, etc. 39 // liuigtk3.so, etc.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 const base::string16& tool_tip) const = 0; 96 const base::string16& tool_tip) const = 0;
97 97
98 // Returns the icon for a given content type from the icon theme. 98 // Returns the icon for a given content type from the icon theme.
99 // TODO(davidben): Add an observer for the theme changing, so we can drop the 99 // TODO(davidben): Add an observer for the theme changing, so we can drop the
100 // caches. 100 // caches.
101 virtual gfx::Image GetIconForContentType( 101 virtual gfx::Image GetIconForContentType(
102 const std::string& content_type, int size) const = 0; 102 const std::string& content_type, int size) const = 0;
103 103
104 // Builds a Border which paints the native button style. 104 // Builds a Border which paints the native button style.
105 virtual scoped_ptr<Border> CreateNativeBorder( 105 virtual scoped_ptr<Border> CreateNativeBorder(
106 views::CustomButton* owning_button, 106 views::LabelButton* owning_button,
107 scoped_ptr<views::Border> border) = 0; 107 scoped_ptr<views::Border> border) = 0;
108 108
109 // Notifies the observer about changes about how window buttons should be 109 // Notifies the observer about changes about how window buttons should be
110 // laid out. If the order is anything other than the default min,max,close on 110 // laid out. If the order is anything other than the default min,max,close on
111 // the right, will immediately send a button change event to the observer. 111 // the right, will immediately send a button change event to the observer.
112 virtual void AddWindowButtonOrderObserver( 112 virtual void AddWindowButtonOrderObserver(
113 WindowButtonOrderObserver* observer) = 0; 113 WindowButtonOrderObserver* observer) = 0;
114 114
115 // Removes the observer from the LinuxUI's list. 115 // Removes the observer from the LinuxUI's list.
116 virtual void RemoveWindowButtonOrderObserver( 116 virtual void RemoveWindowButtonOrderObserver(
117 WindowButtonOrderObserver* observer) = 0; 117 WindowButtonOrderObserver* observer) = 0;
118 118
119 // Determines whether the user's window manager is Unity. 119 // Determines whether the user's window manager is Unity.
120 virtual bool UnityIsRunning() = 0; 120 virtual bool UnityIsRunning() = 0;
121 }; 121 };
122 122
123 } // namespace views 123 } // namespace views
124 124
125 #endif // UI_VIEWS_LINUX_UI_LINUX_UI_H_ 125 #endif // UI_VIEWS_LINUX_UI_LINUX_UI_H_
OLDNEW
« no previous file with comments | « ui/views/controls/button/label_button_border.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698