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

Side by Side Diff: chrome/browser/gtk/extension_shelf_gtk.cc

Issue 164092: Correctly handle extensions width in the GTK extension shelf. (Closed)
Patch Set: Created 11 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
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/gtk/extension_view_gtk.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/extension_shelf_gtk.h" 5 #include "chrome/browser/gtk/extension_shelf_gtk.h"
6 6
7 #include "chrome/browser/browser.h" 7 #include "chrome/browser/browser.h"
8 #include "chrome/browser/gtk/browser_window_gtk.h" 8 #include "chrome/browser/gtk/browser_window_gtk.h"
9 #include "chrome/browser/gtk/gtk_theme_provider.h" 9 #include "chrome/browser/gtk/gtk_theme_provider.h"
10 #include "chrome/browser/gtk/nine_box.h" 10 #include "chrome/browser/gtk/nine_box.h"
(...skipping 29 matching lines...) Expand all
40 40
41 ExtensionHost* host_; 41 ExtensionHost* host_;
42 42
43 const std::string extension_name_; 43 const std::string extension_name_;
44 44
45 private: 45 private:
46 DISALLOW_COPY_AND_ASSIGN(Toolstrip); 46 DISALLOW_COPY_AND_ASSIGN(Toolstrip);
47 }; 47 };
48 48
49 void ExtensionShelfGtk::Toolstrip::AddToolstripToBox(GtkWidget* box) { 49 void ExtensionShelfGtk::Toolstrip::AddToolstripToBox(GtkWidget* box) {
50 gtk_box_pack_start(GTK_BOX(box), native_view(), TRUE, TRUE, 50 gtk_box_pack_start(GTK_BOX(box), native_view(), FALSE, FALSE,
51 kToolstripPadding); 51 kToolstripPadding);
52 } 52 }
53 53
54 void ExtensionShelfGtk::Toolstrip::RemoveToolstripFromBox(GtkWidget* box) { 54 void ExtensionShelfGtk::Toolstrip::RemoveToolstripFromBox(GtkWidget* box) {
55 gtk_container_remove(GTK_CONTAINER(box), native_view()); 55 gtk_container_remove(GTK_CONTAINER(box), native_view());
56 } 56 }
57 57
58 void ExtensionShelfGtk::Toolstrip::Init() { 58 void ExtensionShelfGtk::Toolstrip::Init() {
59 host_->view()->set_is_toolstrip(true); 59 host_->view()->set_is_toolstrip(true);
60 gtk_widget_show_all(native_view()); 60 gtk_widget_show_all(native_view());
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 event->area.width, event->area.height); 214 event->area.width, event->area.height);
215 cairo_clip(cr); 215 cairo_clip(cr);
216 bar->InitBackground(); 216 bar->InitBackground();
217 bar->background_ninebox_->RenderTopCenterStrip( 217 bar->background_ninebox_->RenderTopCenterStrip(
218 cr, event->area.x, event->area.y, 218 cr, event->area.x, event->area.y,
219 event->area.x + event->area.width); 219 event->area.x + event->area.width);
220 cairo_destroy(cr); 220 cairo_destroy(cr);
221 221
222 return FALSE; // Propagate expose to children. 222 return FALSE; // Propagate expose to children.
223 } 223 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/gtk/extension_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698