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

Unified Diff: chrome/browser/ui/libgtk2ui/gtk2_util.h

Issue 18334003: Linux status icon for Ubuntu Unity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: file restored Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/libgtk2ui/gtk2_util.h
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_util.h b/chrome/browser/ui/libgtk2ui/gtk2_util.h
index 77a1cbf7bee0ffebda3659af14e23bda778c319e..ca5274c173bfff5ee4f73fe28dca3a0bf52cb3c8 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_util.h
+++ b/chrome/browser/ui/libgtk2ui/gtk2_util.h
@@ -5,10 +5,9 @@
#ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UTIL_H_
#define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UTIL_H_
+#include <gtk/gtk.h>
#include <string>
-typedef struct _GdkPixbuf GdkPixbuf;
-
class CommandLine;
class SkBitmap;
@@ -16,6 +15,10 @@ namespace base {
class Environment;
}
+namespace ui {
+class Accelerator;
+}
+
namespace libgtk2ui {
void GtkInitFromCommandLine(const CommandLine& command_line);
@@ -23,7 +26,22 @@ void GtkInitFromCommandLine(const CommandLine& command_line);
// Returns the name of the ".desktop" file associated with our running process.
std::string GetDesktopName(base::Environment* env);
-const SkBitmap GdkPixbufToImageSkia(GdkPixbuf* pixbuf);
+// Show the image for the given menu item, even if the user's default is to not
+// show images. Only to be used for favicons or other menus where the image is
+// crucial to its functionality.
+void SetAlwaysShowImage(GtkWidget* image_menu_item);
+
+// Change windows accelerator style to GTK style. (GTK uses _ for
+// accelerators. Windows uses & with && as an escape for &.)
+std::string ConvertAcceleratorsFromWindowsStyle(const std::string& label);
+
+guint GetGdkKeyCodeForAccelerator(const ui::Accelerator& accelerator);
+
+GdkModifierType GetGdkModifierForAccelerator(
+ const ui::Accelerator& accelerator);
+
+// Translates event flags into plaform independent event flags.
+int EventFlagsFromGdkState(guint state);
} // namespace libgtk2ui

Powered by Google App Engine
This is Rietveld 408576698