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

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

Issue 6849030: Add support for multi resolution icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comments Created 9 years, 8 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/back_forward_button_gtk.h" 5 #include "chrome/browser/ui/gtk/back_forward_button_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 13 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
14 #include "chrome/browser/ui/gtk/gtk_util.h" 14 #include "chrome/browser/ui/gtk/gtk_util.h"
15 #include "chrome/browser/ui/gtk/menu_gtk.h" 15 #include "chrome/browser/ui/gtk/menu_gtk.h"
16 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" 16 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h"
17 #include "grit/generated_resources.h" 17 #include "grit/generated_resources.h"
18 #include "grit/theme_resources.h" 18 #include "grit/theme_resources.h"
19 #include "grit/theme_resources_standard.h"
19 #include "ui/base/l10n/l10n_util.h" 20 #include "ui/base/l10n/l10n_util.h"
20 21
21 // The time in milliseconds between when the user clicks and the menu appears. 22 // The time in milliseconds between when the user clicks and the menu appears.
22 static const int kMenuTimerDelay = 500; 23 static const int kMenuTimerDelay = 500;
23 24
24 BackForwardButtonGtk::BackForwardButtonGtk(Browser* browser, bool is_forward) 25 BackForwardButtonGtk::BackForwardButtonGtk(Browser* browser, bool is_forward)
25 : browser_(browser), 26 : browser_(browser),
26 is_forward_(is_forward), 27 is_forward_(is_forward),
27 show_menu_factory_(this) { 28 show_menu_factory_(this) {
28 int normal, pushed, hover, disabled, tooltip; 29 int normal, pushed, hover, disabled, tooltip;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 int drag_min_distance; 121 int drag_min_distance;
121 g_object_get(settings, "gtk-dnd-drag-threshold", &drag_min_distance, NULL); 122 g_object_get(settings, "gtk-dnd-drag-threshold", &drag_min_distance, NULL);
122 if (event->y - y_position_of_last_press_ < drag_min_distance) 123 if (event->y - y_position_of_last_press_ < drag_min_distance)
123 return FALSE; 124 return FALSE;
124 125
125 // We will show the menu now. Cancel the delayed event. 126 // We will show the menu now. Cancel the delayed event.
126 show_menu_factory_.RevokeAll(); 127 show_menu_factory_.RevokeAll();
127 ShowBackForwardMenu(/* button */ 1, event->time); 128 ShowBackForwardMenu(/* button */ 1, event->time);
128 return FALSE; 129 return FALSE;
129 } 130 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_view.mm ('k') | chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698