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

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

Issue 6307019: Cleanup: remove unused internet and system pages for chrome os options. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed options_window_view as well. Created 9 years, 10 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 #include "chrome/browser/ui/gtk/gtk_util.h" 5 #include "chrome/browser/ui/gtk/gtk_util.h"
6 6
7 #include <cairo/cairo.h> 7 #include <cairo/cairo.h>
8 #include <gdk/gdkx.h> 8 #include <gdk/gdkx.h>
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 20 matching lines...) Expand all
31 #include "chrome/common/renderer_preferences.h" 31 #include "chrome/common/renderer_preferences.h"
32 #include "gfx/gtk_util.h" 32 #include "gfx/gtk_util.h"
33 #include "googleurl/src/gurl.h" 33 #include "googleurl/src/gurl.h"
34 #include "grit/theme_resources.h" 34 #include "grit/theme_resources.h"
35 #include "third_party/skia/include/core/SkBitmap.h" 35 #include "third_party/skia/include/core/SkBitmap.h"
36 #include "third_party/skia/include/core/SkColor.h" 36 #include "third_party/skia/include/core/SkColor.h"
37 #include "ui/base/l10n/l10n_util.h" 37 #include "ui/base/l10n/l10n_util.h"
38 #include "ui/base/resource/resource_bundle.h" 38 #include "ui/base/resource/resource_bundle.h"
39 #include "ui/base/x/x11_util.h" 39 #include "ui/base/x/x11_util.h"
40 40
41 #if defined(OS_CHROMEOS) 41 #if defined(OS_CHROMEOS)
satorux1 2011/01/31 09:24:14 I think you can remove code in OS_CHROMEOS from th
falken 2011/02/01 05:21:01 Done.
42 #include "chrome/browser/chromeos/frame/browser_view.h" 42 #include "chrome/browser/chromeos/frame/browser_view.h"
43 #include "chrome/browser/chromeos/native_dialog_window.h" 43 #include "chrome/browser/chromeos/native_dialog_window.h"
44 #include "chrome/browser/chromeos/options/options_window_view.h"
45 #include "views/window/window.h" 44 #include "views/window/window.h"
46 #else 45 #else
47 #include "chrome/browser/ui/gtk/browser_window_gtk.h" 46 #include "chrome/browser/ui/gtk/browser_window_gtk.h"
48 #endif 47 #endif
49 48
50 using WebKit::WebDragOperationsMask; 49 using WebKit::WebDragOperationsMask;
51 using WebKit::WebDragOperation; 50 using WebKit::WebDragOperation;
52 using WebKit::WebDragOperationNone; 51 using WebKit::WebDragOperationNone;
53 using WebKit::WebDragOperationCopy; 52 using WebKit::WebDragOperationCopy;
54 using WebKit::WebDragOperationLink; 53 using WebKit::WebDragOperationLink;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 for (GList* item = children; item; item = item->next) { 135 for (GList* item = children; item; item = item->next) {
137 gtk_container_propagate_expose(GTK_CONTAINER(widget), 136 gtk_container_propagate_expose(GTK_CONTAINER(widget),
138 GTK_WIDGET(item->data), 137 GTK_WIDGET(item->data),
139 event); 138 event);
140 } 139 }
141 g_list_free(children); 140 g_list_free(children);
142 141
143 return TRUE; 142 return TRUE;
144 } 143 }
145 144
146 #if defined(OS_CHROMEOS) 145 #if defined(OS_CHROMEOS)
satorux1 2011/01/31 09:24:14 ditto.
falken 2011/02/01 05:21:01 Done.
147 146
148 TabContents* GetBrowserWindowSelectedTabContents(BrowserWindow* window) { 147 TabContents* GetBrowserWindowSelectedTabContents(BrowserWindow* window) {
149 chromeos::BrowserView* browser_view = static_cast<chromeos::BrowserView*>( 148 chromeos::BrowserView* browser_view = static_cast<chromeos::BrowserView*>(
150 window); 149 window);
151 return browser_view->GetSelectedTabContents(); 150 return browser_view->GetSelectedTabContents();
152 } 151 }
153 152
154 GtkWidget* GetBrowserWindowFocusedWidget(BrowserWindow* window) { 153 GtkWidget* GetBrowserWindowFocusedWidget(BrowserWindow* window) {
155 gfx::NativeView widget = gtk_window_get_focus(window->GetNativeHandle()); 154 gfx::NativeView widget = gtk_window_get_focus(window->GetNativeHandle());
156 155
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 *selected_base = style->base[GTK_STATE_SELECTED]; 996 *selected_base = style->base[GTK_STATE_SELECTED];
998 if (normal_text) 997 if (normal_text)
999 *normal_text = style->text[GTK_STATE_NORMAL]; 998 *normal_text = style->text[GTK_STATE_NORMAL];
1000 if (selected_text) 999 if (selected_text)
1001 *selected_text = style->text[GTK_STATE_SELECTED]; 1000 *selected_text = style->text[GTK_STATE_SELECTED];
1002 1001
1003 g_object_ref_sink(fake_entry); 1002 g_object_ref_sink(fake_entry);
1004 g_object_unref(fake_entry); 1003 g_object_unref(fake_entry);
1005 } 1004 }
1006 1005
1007 #if defined(OS_CHROMEOS) 1006 #if defined(OS_CHROMEOS)
satorux1 2011/01/31 09:24:14 I think you can delete the entire OS_CHROMEOS bloc
falken 2011/02/01 05:21:01 Done.
1008 1007
1009 GtkWindow* GetDialogTransientParent(GtkWindow* dialog) { 1008 GtkWindow* GetDialogTransientParent(GtkWindow* dialog) {
1010 GtkWindow* parent = gtk_window_get_transient_for(dialog); 1009 GtkWindow* parent = gtk_window_get_transient_for(dialog);
1011 if (!parent)
1012 parent = chromeos::GetOptionsViewParent();
1013
1014 return parent; 1010 return parent;
1015 } 1011 }
1016 1012
1017 void ShowDialog(GtkWidget* dialog) { 1013 void ShowDialog(GtkWidget* dialog) {
1018 // Make sure all controls are visible so that we get correct size. 1014 // Make sure all controls are visible so that we get correct size.
1019 gtk_widget_show_all(GTK_DIALOG(dialog)->vbox); 1015 gtk_widget_show_all(GTK_DIALOG(dialog)->vbox);
1020 1016
1021 // Get dialog window size. 1017 // Get dialog window size.
1022 gint width = 0; 1018 gint width = 0;
1023 gint height = 0; 1019 gint height = 0;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 1237
1242 void DoCopy(BrowserWindow* window) { 1238 void DoCopy(BrowserWindow* window) {
1243 DoCutCopyPaste(window, &RenderViewHost::Copy, "copy-clipboard"); 1239 DoCutCopyPaste(window, &RenderViewHost::Copy, "copy-clipboard");
1244 } 1240 }
1245 1241
1246 void DoPaste(BrowserWindow* window) { 1242 void DoPaste(BrowserWindow* window) {
1247 DoCutCopyPaste(window, &RenderViewHost::Paste, "paste-clipboard"); 1243 DoCutCopyPaste(window, &RenderViewHost::Paste, "paste-clipboard");
1248 } 1244 }
1249 1245
1250 } // namespace gtk_util 1246 } // namespace gtk_util
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/system_page_view.cc ('k') | chrome/browser/ui/gtk/options/content_page_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698