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

Side by Side Diff: ui/views/controls/button/label_button.cc

Issue 23531053: ui/base/animation -> ui/gfx/animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 2 trunk Created 7 years, 3 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/controls/button/label_button.h" 5 #include "ui/views/controls/button/label_button.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "grit/ui_resources.h" 8 #include "grit/ui_resources.h"
9 #include "ui/base/animation/throb_animation.h"
10 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/gfx/animation/throb_animation.h"
11 #include "ui/gfx/sys_color_change_listener.h" 11 #include "ui/gfx/sys_color_change_listener.h"
12 #include "ui/native_theme/native_theme.h" 12 #include "ui/native_theme/native_theme.h"
13 #include "ui/views/controls/button/label_button_border.h" 13 #include "ui/views/controls/button/label_button_border.h"
14 #include "ui/views/focus_border.h" 14 #include "ui/views/focus_border.h"
15 #include "ui/views/window/dialog_delegate.h" 15 #include "ui/views/window/dialog_delegate.h"
16 16
17 #if defined(OS_WIN) 17 #if defined(OS_WIN)
18 #include "ui/native_theme/native_theme_win.h" 18 #include "ui/native_theme/native_theme_win.h"
19 #endif 19 #endif
20 20
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 switch (state()) { 339 switch (state()) {
340 case STATE_NORMAL: return ui::NativeTheme::kNormal; 340 case STATE_NORMAL: return ui::NativeTheme::kNormal;
341 case STATE_HOVERED: return ui::NativeTheme::kHovered; 341 case STATE_HOVERED: return ui::NativeTheme::kHovered;
342 case STATE_PRESSED: return ui::NativeTheme::kPressed; 342 case STATE_PRESSED: return ui::NativeTheme::kPressed;
343 case STATE_DISABLED: return ui::NativeTheme::kDisabled; 343 case STATE_DISABLED: return ui::NativeTheme::kDisabled;
344 case STATE_COUNT: NOTREACHED() << "Unknown state: " << state(); 344 case STATE_COUNT: NOTREACHED() << "Unknown state: " << state();
345 } 345 }
346 return ui::NativeTheme::kNormal; 346 return ui::NativeTheme::kNormal;
347 } 347 }
348 348
349 const ui::Animation* LabelButton::GetThemeAnimation() const { 349 const gfx::Animation* LabelButton::GetThemeAnimation() const {
350 #if defined(OS_WIN) 350 #if defined(OS_WIN)
351 if (style() == STYLE_NATIVE_TEXTBUTTON && 351 if (style() == STYLE_NATIVE_TEXTBUTTON &&
352 GetNativeTheme() == ui::NativeThemeWin::instance()) { 352 GetNativeTheme() == ui::NativeThemeWin::instance()) {
353 return ui::NativeThemeWin::instance()->IsThemingActive() ? 353 return ui::NativeThemeWin::instance()->IsThemingActive() ?
354 hover_animation_.get() : NULL; 354 hover_animation_.get() : NULL;
355 } 355 }
356 #endif 356 #endif
357 return hover_animation_.get(); 357 return hover_animation_.get();
358 } 358 }
359 359
360 ui::NativeTheme::State LabelButton::GetBackgroundThemeState( 360 ui::NativeTheme::State LabelButton::GetBackgroundThemeState(
361 ui::NativeTheme::ExtraParams* params) const { 361 ui::NativeTheme::ExtraParams* params) const {
362 GetExtraParams(params); 362 GetExtraParams(params);
363 return ui::NativeTheme::kNormal; 363 return ui::NativeTheme::kNormal;
364 } 364 }
365 365
366 ui::NativeTheme::State LabelButton::GetForegroundThemeState( 366 ui::NativeTheme::State LabelButton::GetForegroundThemeState(
367 ui::NativeTheme::ExtraParams* params) const { 367 ui::NativeTheme::ExtraParams* params) const {
368 GetExtraParams(params); 368 GetExtraParams(params);
369 return ui::NativeTheme::kHovered; 369 return ui::NativeTheme::kHovered;
370 } 370 }
371 371
372 } // namespace views 372 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/label_button.h ('k') | ui/views/controls/button/label_button_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698