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

Side by Side Diff: chrome/browser/ui/gtk/gtk_util.h

Issue 10337010: Revert r123782. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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 | « chrome/browser/ui/gtk/gtk_tree.cc ('k') | chrome/browser/ui/gtk/gtk_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_GTK_UTIL_H_
6 #define CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ 6 #define CHROME_BROWSER_UI_GTK_GTK_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "ui/base/x/x11_util.h" 14 #include "ui/base/x/x11_util.h"
15 #include "ui/gfx/point.h" 15 #include "ui/gfx/point.h"
16 #include "ui/gfx/rect.h" 16 #include "ui/gfx/rect.h"
17 #include "webkit/glue/window_open_disposition.h" 17 #include "webkit/glue/window_open_disposition.h"
18 18
19 typedef struct _cairo cairo_t; 19 typedef struct _cairo cairo_t;
20 typedef struct _GdkColor GdkColor; 20 typedef struct _GdkColor GdkColor;
21 typedef struct _GtkWidget GtkWidget; 21 typedef struct _GtkWidget GtkWidget;
22 22
23 class BrowserWindow; 23 class BrowserWindow;
24 class ThemeServiceGtk; 24 class GtkThemeService;
25 class GURL; 25 class GURL;
26 class Profile; 26 class Profile;
27 27
28 namespace content { 28 namespace content {
29 struct RendererPreferences; 29 struct RendererPreferences;
30 } 30 }
31 31
32 namespace event_utils { 32 namespace event_utils {
33 33
34 // Translates GdkEvent state into what kind of disposition they represent. 34 // Translates GdkEvent state into what kind of disposition they represent.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 // Set up the text to be displayed by |layout|. 215 // Set up the text to be displayed by |layout|.
216 void SetLayoutText(PangoLayout* layout, const string16& text); 216 void SetLayoutText(PangoLayout* layout, const string16& text);
217 217
218 // Draws the background of the toolbar area subject to the expose rectangle 218 // Draws the background of the toolbar area subject to the expose rectangle
219 // |event| and starting image tiling from |tabstrip_origin|. 219 // |event| and starting image tiling from |tabstrip_origin|.
220 void DrawThemedToolbarBackground(GtkWidget* widget, 220 void DrawThemedToolbarBackground(GtkWidget* widget,
221 cairo_t* cr, 221 cairo_t* cr,
222 GdkEventExpose* event, 222 GdkEventExpose* event,
223 const gfx::Point& tabstrip_origin, 223 const gfx::Point& tabstrip_origin,
224 ThemeServiceGtk* provider); 224 GtkThemeService* provider);
225 225
226 // Returns the two colors averaged together. 226 // Returns the two colors averaged together.
227 GdkColor AverageColors(GdkColor color_one, GdkColor color_two); 227 GdkColor AverageColors(GdkColor color_one, GdkColor color_two);
228 228
229 // Show the image for the given menu item, even if the user's default is to not 229 // Show the image for the given menu item, even if the user's default is to not
230 // show images. Only to be used for favicons or other menus where the image is 230 // show images. Only to be used for favicons or other menus where the image is
231 // crucial to its functionality. 231 // crucial to its functionality.
232 void SetAlwaysShowImage(GtkWidget* image_menu_item); 232 void SetAlwaysShowImage(GtkWidget* image_menu_item);
233 233
234 // Get a rectangle corresponding to a widget's allocation relative to its 234 // Get a rectangle corresponding to a widget's allocation relative to its
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 void ApplyMessageDialogQuirks(GtkWidget* dialog); 326 void ApplyMessageDialogQuirks(GtkWidget* dialog);
327 327
328 // Performs Cut/Copy/Paste operation on the |window|. 328 // Performs Cut/Copy/Paste operation on the |window|.
329 void DoCut(BrowserWindow* window); 329 void DoCut(BrowserWindow* window);
330 void DoCopy(BrowserWindow* window); 330 void DoCopy(BrowserWindow* window);
331 void DoPaste(BrowserWindow* window); 331 void DoPaste(BrowserWindow* window);
332 332
333 } // namespace gtk_util 333 } // namespace gtk_util
334 334
335 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ 335 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_tree.cc ('k') | chrome/browser/ui/gtk/gtk_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698