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

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

Issue 6154001: Move animation code to new ui/base/animation directory.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/gtk/custom_button.h ('k') | chrome/browser/gtk/download_item_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/custom_button.h" 5 #include "chrome/browser/gtk/custom_button.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chrome/browser/gtk/cairo_cached_surface.h" 9 #include "chrome/browser/gtk/cairo_cached_surface.h"
10 #include "chrome/browser/gtk/gtk_chrome_button.h" 10 #include "chrome/browser/gtk/gtk_chrome_button.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 void CustomDrawHoverController::Init(GtkWidget* widget) { 185 void CustomDrawHoverController::Init(GtkWidget* widget) {
186 DCHECK(widget_ == NULL); 186 DCHECK(widget_ == NULL);
187 widget_ = widget; 187 widget_ = widget;
188 g_signal_connect(widget_, "enter-notify-event", 188 g_signal_connect(widget_, "enter-notify-event",
189 G_CALLBACK(OnEnterThunk), this); 189 G_CALLBACK(OnEnterThunk), this);
190 g_signal_connect(widget_, "leave-notify-event", 190 g_signal_connect(widget_, "leave-notify-event",
191 G_CALLBACK(OnLeaveThunk), this); 191 G_CALLBACK(OnLeaveThunk), this);
192 } 192 }
193 193
194 void CustomDrawHoverController::AnimationProgressed( 194 void CustomDrawHoverController::AnimationProgressed(
195 const Animation* animation) { 195 const ui::Animation* animation) {
196 gtk_widget_queue_draw(widget_); 196 gtk_widget_queue_draw(widget_);
197 } 197 }
198 198
199 gboolean CustomDrawHoverController::OnEnter( 199 gboolean CustomDrawHoverController::OnEnter(
200 GtkWidget* widget, 200 GtkWidget* widget,
201 GdkEventCrossing* event) { 201 GdkEventCrossing* event) {
202 slide_animation_.Show(); 202 slide_animation_.Show();
203 return FALSE; 203 return FALSE;
204 } 204 }
205 205
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 gtk_widget_set_app_paintable(widget(), TRUE); 336 gtk_widget_set_app_paintable(widget(), TRUE);
337 } 337 }
338 338
339 gtk_chrome_button_set_use_gtk_rendering( 339 gtk_chrome_button_set_use_gtk_rendering(
340 GTK_CHROME_BUTTON(widget()), UseGtkTheme()); 340 GTK_CHROME_BUTTON(widget()), UseGtkTheme());
341 } 341 }
342 342
343 bool CustomDrawButton::UseGtkTheme() { 343 bool CustomDrawButton::UseGtkTheme() {
344 return theme_provider_ && theme_provider_->UseGtkTheme(); 344 return theme_provider_ && theme_provider_->UseGtkTheme();
345 } 345 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/custom_button.h ('k') | chrome/browser/gtk/download_item_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698