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

Side by Side Diff: chrome/browser/gtk/options/content_settings_window_gtk.cc

Issue 1241006: Add Geolocation to the content types. This adds several special case guards s... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/gtk/options/content_settings_window_gtk.h" 5 #include "chrome/browser/gtk/options/content_settings_window_gtk.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 gtk_label_new( 107 gtk_label_new(
108 l10n_util::GetStringUTF8(IDS_PLUGIN_TAB_LABEL).c_str())); 108 l10n_util::GetStringUTF8(IDS_PLUGIN_TAB_LABEL).c_str()));
109 gtk_notebook_append_page( 109 gtk_notebook_append_page(
110 GTK_NOTEBOOK(notebook_), 110 GTK_NOTEBOOK(notebook_),
111 popup_page_.get_page_widget(), 111 popup_page_.get_page_widget(),
112 gtk_label_new( 112 gtk_label_new(
113 l10n_util::GetStringUTF8(IDS_POPUP_TAB_LABEL).c_str())); 113 l10n_util::GetStringUTF8(IDS_POPUP_TAB_LABEL).c_str()));
114 114
115 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog_)->vbox), notebook_); 115 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog_)->vbox), notebook_);
116 116
117 // TODO(joth): remove -1 when geolocation tab is added.
117 DCHECK_EQ(gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook_)), 118 DCHECK_EQ(gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook_)),
118 CONTENT_SETTINGS_NUM_TYPES); 119 CONTENT_SETTINGS_NUM_TYPES - 1);
119 120
120 // Need to show the notebook before connecting switch-page signal, otherwise 121 // Need to show the notebook before connecting switch-page signal, otherwise
121 // we'll immediately get a signal switching to page 0 and overwrite our 122 // we'll immediately get a signal switching to page 0 and overwrite our
122 // last_selected_page_ value. 123 // last_selected_page_ value.
123 gtk_widget_show_all(dialog_); 124 gtk_widget_show_all(dialog_);
124 125
125 g_signal_connect(notebook_, "switch-page", 126 g_signal_connect(notebook_, "switch-page",
126 G_CALLBACK(OnSwitchPageThunk), this); 127 G_CALLBACK(OnSwitchPageThunk), this);
127 128
128 // We only have one button and don't do any special handling, so just hook it 129 // We only have one button and don't do any special handling, so just hook it
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 int index = page_num; 168 int index = page_num;
168 DCHECK(index > CONTENT_SETTINGS_TYPE_DEFAULT && 169 DCHECK(index > CONTENT_SETTINGS_TYPE_DEFAULT &&
169 index < CONTENT_SETTINGS_NUM_TYPES); 170 index < CONTENT_SETTINGS_NUM_TYPES);
170 last_selected_page_.SetValue(index); 171 last_selected_page_.SetValue(index);
171 } 172 }
172 173
173 void ContentSettingsWindowGtk::OnWindowDestroy(GtkWidget* widget) { 174 void ContentSettingsWindowGtk::OnWindowDestroy(GtkWidget* widget) {
174 settings_window = NULL; 175 settings_window = NULL;
175 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 176 MessageLoop::current()->DeleteSoon(FROM_HERE, this);
176 } 177 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/options/content_exceptions_window_gtk.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698