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

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

Issue 7067005: Remove Profile code from HostZoomMap. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser_toolbar_gtk.h" 5 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h"
6 6
7 #include <X11/XF86keysym.h> 7 #include <X11/XF86keysym.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // Put the wrench button in a box so that we can paint the update notification 216 // Put the wrench button in a box so that we can paint the update notification
217 // over it. 217 // over it.
218 GtkWidget* wrench_box = gtk_alignment_new(0, 0, 1, 1); 218 GtkWidget* wrench_box = gtk_alignment_new(0, 0, 1, 1);
219 g_signal_connect_after(wrench_box, "expose-event", 219 g_signal_connect_after(wrench_box, "expose-event",
220 G_CALLBACK(OnWrenchMenuButtonExposeThunk), this); 220 G_CALLBACK(OnWrenchMenuButtonExposeThunk), this);
221 gtk_container_add(GTK_CONTAINER(wrench_box), wrench_button); 221 gtk_container_add(GTK_CONTAINER(wrench_box), wrench_button);
222 gtk_box_pack_start(GTK_BOX(toolbar_), wrench_box, FALSE, FALSE, 4); 222 gtk_box_pack_start(GTK_BOX(toolbar_), wrench_box, FALSE, FALSE, 4);
223 223
224 wrench_menu_.reset(new MenuGtk(this, &wrench_menu_model_)); 224 wrench_menu_.reset(new MenuGtk(this, &wrench_menu_model_));
225 registrar_.Add(this, NotificationType::ZOOM_LEVEL_CHANGED, 225 registrar_.Add(this, NotificationType::ZOOM_LEVEL_CHANGED,
226 Source<Profile>(browser_->profile())); 226 Source<HostZoomMap>(browser_->profile()->GetHostZoomMap()));
227 227
228 if (ShouldOnlyShowLocation()) { 228 if (ShouldOnlyShowLocation()) {
229 gtk_widget_show(event_box_); 229 gtk_widget_show(event_box_);
230 gtk_widget_show(alignment_); 230 gtk_widget_show(alignment_);
231 gtk_widget_show(toolbar_); 231 gtk_widget_show(toolbar_);
232 gtk_widget_show_all(location_hbox_); 232 gtk_widget_show_all(location_hbox_);
233 gtk_widget_hide(reload_->widget()); 233 gtk_widget_hide(reload_->widget());
234 } else { 234 } else {
235 gtk_widget_show_all(event_box_); 235 gtk_widget_show_all(event_box_);
236 if (actions_toolbar_->button_count() == 0) 236 if (actions_toolbar_->button_count() == 0)
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 int x_offset = base::i18n::IsRTL() ? 0 : 649 int x_offset = base::i18n::IsRTL() ? 0 :
650 sender->allocation.width - badge->width(); 650 sender->allocation.width - badge->width();
651 int y_offset = 0; 651 int y_offset = 0;
652 canvas.DrawBitmapInt( 652 canvas.DrawBitmapInt(
653 *badge, 653 *badge,
654 sender->allocation.x + x_offset, 654 sender->allocation.x + x_offset,
655 sender->allocation.y + y_offset); 655 sender->allocation.y + y_offset);
656 656
657 return FALSE; 657 return FALSE;
658 } 658 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698