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

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

Issue 9296041: Create Content API around HostZoomMap. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 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/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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "grit/theme_resources_standard.h" 52 #include "grit/theme_resources_standard.h"
53 #include "ui/base/accelerators/accelerator_gtk.h" 53 #include "ui/base/accelerators/accelerator_gtk.h"
54 #include "ui/base/dragdrop/gtk_dnd_util.h" 54 #include "ui/base/dragdrop/gtk_dnd_util.h"
55 #include "ui/base/l10n/l10n_util.h" 55 #include "ui/base/l10n/l10n_util.h"
56 #include "ui/base/resource/resource_bundle.h" 56 #include "ui/base/resource/resource_bundle.h"
57 #include "ui/gfx/canvas_skia_paint.h" 57 #include "ui/gfx/canvas_skia_paint.h"
58 #include "ui/gfx/gtk_util.h" 58 #include "ui/gfx/gtk_util.h"
59 #include "ui/gfx/image/cairo_cached_surface.h" 59 #include "ui/gfx/image/cairo_cached_surface.h"
60 #include "ui/gfx/skbitmap_operations.h" 60 #include "ui/gfx/skbitmap_operations.h"
61 61
62 using content::HostZoomMap;
62 using content::UserMetricsAction; 63 using content::UserMetricsAction;
63 using content::WebContents; 64 using content::WebContents;
64 65
65 namespace { 66 namespace {
66 67
67 // Padding on left and right of the left toolbar buttons (back, forward, reload, 68 // Padding on left and right of the left toolbar buttons (back, forward, reload,
68 // etc.). 69 // etc.).
69 const int kToolbarLeftAreaPadding = 4; 70 const int kToolbarLeftAreaPadding = 4;
70 71
71 // Height of the toolbar in pixels (not counting padding). 72 // Height of the toolbar in pixels (not counting padding).
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 const SkBitmap* badge = theme_service_->GetBitmapNamed(resource_id); 681 const SkBitmap* badge = theme_service_->GetBitmapNamed(resource_id);
681 gfx::CanvasSkiaPaint canvas(expose, false); 682 gfx::CanvasSkiaPaint canvas(expose, false);
682 int x_offset = base::i18n::IsRTL() ? 0 : allocation.width - badge->width(); 683 int x_offset = base::i18n::IsRTL() ? 0 : allocation.width - badge->width();
683 int y_offset = 0; 684 int y_offset = 0;
684 canvas.DrawBitmapInt(*badge, 685 canvas.DrawBitmapInt(*badge,
685 allocation.x + x_offset, 686 allocation.x + x_offset,
686 allocation.y + y_offset); 687 allocation.y + y_offset);
687 688
688 return FALSE; 689 return FALSE;
689 } 690 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698