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

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

Issue 7779040: Start moving code from BrowserMain to content, so that it can be reused by all embedders of conte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix windows unittest Created 9 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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>
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // Returns the bounds of the specified widget in screen coordinates. 120 // Returns the bounds of the specified widget in screen coordinates.
121 gfx::Rect GetWidgetScreenBounds(GtkWidget* widget); 121 gfx::Rect GetWidgetScreenBounds(GtkWidget* widget);
122 122
123 // Retuns size of the |widget| without window manager decorations. 123 // Retuns size of the |widget| without window manager decorations.
124 gfx::Size GetWidgetSize(GtkWidget* widget); 124 gfx::Size GetWidgetSize(GtkWidget* widget);
125 125
126 // Converts a point in a widget to screen coordinates. The point |p| is 126 // Converts a point in a widget to screen coordinates. The point |p| is
127 // relative to the widget's top-left origin. 127 // relative to the widget's top-left origin.
128 void ConvertWidgetPointToScreen(GtkWidget* widget, gfx::Point* p); 128 void ConvertWidgetPointToScreen(GtkWidget* widget, gfx::Point* p);
129 129
130 // Initialize some GTK settings so that our dialogs are consistent.
131 void InitRCStyles();
132
133 // Stick the widget in the given hbox without expanding vertically. The widget 130 // Stick the widget in the given hbox without expanding vertically. The widget
134 // is packed at the start of the hbox. This is useful for widgets that would 131 // is packed at the start of the hbox. This is useful for widgets that would
135 // otherwise expand to fill the vertical space of the hbox 132 // otherwise expand to fill the vertical space of the hbox
136 // (e.g. buttons). Returns the vbox that widget was packed in. 133 // (e.g. buttons). Returns the vbox that widget was packed in.
137 GtkWidget* CenterWidgetInHBox(GtkWidget* hbox, GtkWidget* widget, 134 GtkWidget* CenterWidgetInHBox(GtkWidget* hbox, GtkWidget* widget,
138 bool pack_at_end, int padding); 135 bool pack_at_end, int padding);
139 136
140 // Returns true if the screen is composited, false otherwise. 137 // Returns true if the screen is composited, false otherwise.
141 bool IsScreenComposited(); 138 bool IsScreenComposited();
142 139
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 void ApplyMessageDialogQuirks(GtkWidget* dialog); 336 void ApplyMessageDialogQuirks(GtkWidget* dialog);
340 337
341 // Performs Cut/Copy/Paste operation on the |window|. 338 // Performs Cut/Copy/Paste operation on the |window|.
342 void DoCut(BrowserWindow* window); 339 void DoCut(BrowserWindow* window);
343 void DoCopy(BrowserWindow* window); 340 void DoCopy(BrowserWindow* window);
344 void DoPaste(BrowserWindow* window); 341 void DoPaste(BrowserWindow* window);
345 342
346 } // namespace gtk_util 343 } // namespace gtk_util
347 344
348 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ 345 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698