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

Unified Diff: chrome/browser/ui/gtk/gtk_util.cc

Issue 7850026: Aura under Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: First version that links (and crashes) 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/gtk_util.cc
diff --git a/chrome/browser/ui/gtk/gtk_util.cc b/chrome/browser/ui/gtk/gtk_util.cc
index 5107045a1446707d34fca7fd292f7538f7a1547e..aa5fae7231753e3d604af4e2335f1972199c058c 100644
--- a/chrome/browser/ui/gtk/gtk_util.cc
+++ b/chrome/browser/ui/gtk/gtk_util.cc
@@ -189,7 +189,12 @@ TabContents* GetBrowserWindowSelectedTabContents(BrowserWindow* window) {
}
GtkWidget* GetBrowserWindowFocusedWidget(BrowserWindow* window) {
+#if defined(USE_AURA)
+ // TODO(saintlou): This entire module should be removed from Aura soon
Ben Goodger (Google) 2011/09/16 01:11:18 Why do you need to build this file?
Emmanuel Saint-loubert-Bié 2011/09/16 02:34:54 There are a few methods that we need, but will be
+ return NULL;
+#else
return gtk_window_get_focus(window->GetNativeHandle());
+#endif
}
#endif
@@ -391,6 +396,10 @@ void CenterOverWindow(GtkWindow* window, GtkWindow* parent) {
}
void MakeAppModalWindowGroup() {
+#if defined(USE_AURA)
+ // TODO(saintlou): This entire module should be removed from Aura soon
+ return;
+#else
// Older versions of GTK+ don't give us gtk_window_group_list() which is what
// we need to add current non-browser modal dialogs to the list. If
// we have 2.14+ we can do things the correct way.
@@ -408,9 +417,14 @@ void MakeAppModalWindowGroup() {
g_list_free(all_windows);
}
g_object_unref(window_group);
+#endif
}
void AppModalDismissedUngroupWindows() {
+#if defined(USE_AURA)
+ // TODO(saintlou): This entire module should be removed from Aura soon
+ return;
+#else
if (BrowserList::begin() != BrowserList::end()) {
std::vector<GtkWindow*> transient_windows;
@@ -439,6 +453,7 @@ void AppModalDismissedUngroupWindows() {
gtk_window_group_add_window(group, *it);
}
}
+#endif
}
void RemoveAllChildren(GtkWidget* container) {
@@ -802,6 +817,7 @@ void DrawThemedToolbarBackground(GtkWidget* widget,
GdkEventExpose* event,
const gfx::Point& tabstrip_origin,
GtkThemeService* theme_service) {
+#if !defined(USE_AURA)
// Fill the entire region with the toolbar color.
GdkColor color = theme_service->GetGdkColor(
ThemeService::COLOR_TOOLBAR);
@@ -822,6 +838,7 @@ void DrawThemedToolbarBackground(GtkWidget* widget,
event->area.x + event->area.width - tabstrip_origin.x(),
event->area.y + event->area.height - tabstrip_origin.y());
cairo_fill(cr);
+#endif
}
GdkColor AverageColors(GdkColor color_one, GdkColor color_two) {
@@ -1217,6 +1234,10 @@ void ApplyMessageDialogQuirks(GtkWidget* dialog) {
void DoCutCopyPaste(BrowserWindow* window,
void (RenderViewHost::*method)(),
const char* signal) {
+#if defined(USE_AURA)
+ // TODO(saintlou): This entire module should be removed from Aura soon
+ return;
+#else
GtkWidget* widget = GetBrowserWindowFocusedWidget(window);
if (widget == NULL)
return; // Do nothing if no focused widget.
@@ -1229,6 +1250,7 @@ void DoCutCopyPaste(BrowserWindow* window,
if ((id = g_signal_lookup(signal, G_OBJECT_TYPE(widget))) != 0)
g_signal_emit(widget, id, 0);
}
+#endif
}
void DoCut(BrowserWindow* window) {

Powered by Google App Engine
This is Rietveld 408576698