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

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

Issue 6766004: Create a ProfileDependencyManager to order ProfileKeyedService destruction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix improper usage of static_cast<> in existing mac code. 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
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.cc ('k') | chrome/chrome_browser.gypi » ('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/reload_button_gtk.h" 5 #include "chrome/browser/ui/gtk/reload_button_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 g_signal_connect(widget(), "query-tooltip", G_CALLBACK(OnQueryTooltipThunk), 54 g_signal_connect(widget(), "query-tooltip", G_CALLBACK(OnQueryTooltipThunk),
55 this); 55 this);
56 56
57 hover_controller_.Init(widget()); 57 hover_controller_.Init(widget());
58 gtk_util::SetButtonTriggersNavigation(widget()); 58 gtk_util::SetButtonTriggersNavigation(widget());
59 59
60 if (theme_service_) { 60 if (theme_service_) {
61 theme_service_->InitThemesFor(this); 61 theme_service_->InitThemesFor(this);
62 registrar_.Add(this, 62 registrar_.Add(this,
63 NotificationType::BROWSER_THEME_CHANGED, 63 NotificationType::BROWSER_THEME_CHANGED,
64 Source<GtkThemeService>(theme_service_)); 64 Source<ThemeService>(theme_service_));
65 } 65 }
66 66
67 // Set the default double-click timer delay to the system double-click time. 67 // Set the default double-click timer delay to the system double-click time.
68 int timer_delay_ms; 68 int timer_delay_ms;
69 GtkSettings* settings = gtk_settings_get_default(); 69 GtkSettings* settings = gtk_settings_get_default();
70 g_object_get(G_OBJECT(settings), "gtk-double-click-time", &timer_delay_ms, 70 g_object_get(G_OBJECT(settings), "gtk-double-click-time", &timer_delay_ms,
71 NULL); 71 NULL);
72 double_click_timer_delay_ = base::TimeDelta::FromMilliseconds(timer_delay_ms); 72 double_click_timer_delay_ = base::TimeDelta::FromMilliseconds(timer_delay_ms);
73 } 73 }
74 74
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 //////////////////////////////////////////////////////////////////////////////// 126 ////////////////////////////////////////////////////////////////////////////////
127 // ReloadButtonGtk, NotificationObserver implementation: 127 // ReloadButtonGtk, NotificationObserver implementation:
128 128
129 void ReloadButtonGtk::Observe(NotificationType type, 129 void ReloadButtonGtk::Observe(NotificationType type,
130 const NotificationSource& source, 130 const NotificationSource& source,
131 const NotificationDetails& /* details */) { 131 const NotificationDetails& /* details */) {
132 DCHECK(NotificationType::BROWSER_THEME_CHANGED == type); 132 DCHECK(NotificationType::BROWSER_THEME_CHANGED == type);
133 133
134 GtkThemeService* provider = static_cast<GtkThemeService*>( 134 GtkThemeService* provider = static_cast<GtkThemeService*>(
135 Source<GtkThemeService>(source).ptr()); 135 Source<ThemeService>(source).ptr());
136 DCHECK_EQ(provider, theme_service_); 136 DCHECK_EQ(provider, theme_service_);
137 GtkButtonWidth = 0; 137 GtkButtonWidth = 0;
138 UpdateThemeButtons(); 138 UpdateThemeButtons();
139 } 139 }
140 140
141 //////////////////////////////////////////////////////////////////////////////// 141 ////////////////////////////////////////////////////////////////////////////////
142 // ReloadButtonGtk, private: 142 // ReloadButtonGtk, private:
143 143
144 void ReloadButtonGtk::OnClicked(GtkWidget* /* sender */) { 144 void ReloadButtonGtk::OnClicked(GtkWidget* /* sender */) {
145 if (visible_mode_ == MODE_STOP) { 145 if (visible_mode_ == MODE_STOP) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 gtk_chrome_button_set_use_gtk_rendering(GTK_CHROME_BUTTON(widget()), use_gtk); 270 gtk_chrome_button_set_use_gtk_rendering(GTK_CHROME_BUTTON(widget()), use_gtk);
271 } 271 }
272 272
273 void ReloadButtonGtk::OnDoubleClickTimer() { 273 void ReloadButtonGtk::OnDoubleClickTimer() {
274 ChangeMode(intended_mode_, false); 274 ChangeMode(intended_mode_, false);
275 } 275 }
276 276
277 void ReloadButtonGtk::OnStopToReloadTimer() { 277 void ReloadButtonGtk::OnStopToReloadTimer() {
278 ChangeMode(intended_mode_, true); 278 ChangeMode(intended_mode_, true);
279 } 279 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698