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

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

Issue 7538010: Make BrowserWindow::CreateFindBar non-static so that it can be overridden by Panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove underscore. Created 9 years, 4 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/find_bar_gtk.h" 5 #include "chrome/browser/ui/gtk/find_bar_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 *alignment = gtk_alignment_new(0.0, 0.0, 1.0, 1.0); 166 *alignment = gtk_alignment_new(0.0, 0.0, 1.0, 1.0);
167 gtk_alignment_set_padding(GTK_ALIGNMENT(*alignment), 167 gtk_alignment_set_padding(GTK_ALIGNMENT(*alignment),
168 padding_top, padding_bottom, padding_left, 168 padding_top, padding_bottom, padding_left,
169 padding_right); 169 padding_right);
170 gtk_container_add(GTK_CONTAINER(*alignment), child); 170 gtk_container_add(GTK_CONTAINER(*alignment), child);
171 gtk_container_add(GTK_CONTAINER(*ebox), *alignment); 171 gtk_container_add(GTK_CONTAINER(*ebox), *alignment);
172 } 172 }
173 173
174 } // namespace 174 } // namespace
175 175
176 FindBarGtk::FindBarGtk(Browser* browser) 176 FindBarGtk::FindBarGtk(BrowserWindowGtk* window)
177 : browser_(browser), 177 : browser_(window->browser()),
178 window_(static_cast<BrowserWindowGtk*>(browser->window())), 178 window_(window),
179 theme_service_(GtkThemeService::GetFrom(browser->profile())), 179 theme_service_(GtkThemeService::GetFrom(browser_->profile())),
180 container_width_(-1), 180 container_width_(-1),
181 container_height_(-1), 181 container_height_(-1),
182 match_label_failure_(false), 182 match_label_failure_(false),
183 ignore_changed_signal_(false) { 183 ignore_changed_signal_(false) {
184 InitWidgets(); 184 InitWidgets();
185 ViewIDUtil::SetID(text_entry_, VIEW_ID_FIND_IN_PAGE_TEXT_FIELD); 185 ViewIDUtil::SetID(text_entry_, VIEW_ID_FIND_IN_PAGE_TEXT_FIELD);
186 186
187 // Insert the widget into the browser gtk hierarchy. 187 // Insert the widget into the browser gtk hierarchy.
188 window_->AddFindBar(this); 188 window_->AddFindBar(this);
189 189
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 982
983 // static 983 // static
984 gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event, 984 gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event,
985 FindBarGtk* find_bar) { 985 FindBarGtk* find_bar) {
986 g_signal_handlers_disconnect_by_func( 986 g_signal_handlers_disconnect_by_func(
987 gdk_keymap_get_for_display(gtk_widget_get_display(entry)), 987 gdk_keymap_get_for_display(gtk_widget_get_display(entry)),
988 reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), find_bar); 988 reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), find_bar);
989 989
990 return FALSE; // Continue propagation. 990 return FALSE; // Continue propagation.
991 } 991 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698