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

Side by Side Diff: chrome/browser/ui/views/location_bar/suggested_text_view.h

Issue 9562038: ui/gfx: Make gfx::Canvas inherit from gfx::CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 9 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) 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 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SUGGESTED_TEXT_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SUGGESTED_TEXT_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SUGGESTED_TEXT_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SUGGESTED_TEXT_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/base/animation/animation_delegate.h" 10 #include "ui/base/animation/animation_delegate.h"
11 #include "ui/views/controls/label.h" 11 #include "ui/views/controls/label.h"
(...skipping 12 matching lines...) Expand all
24 // Starts the animation. If the animation is currently running it is stopped 24 // Starts the animation. If the animation is currently running it is stopped
25 // and restarted. The animation transitions the suggested text to look like 25 // and restarted. The animation transitions the suggested text to look like
26 // selected text. When the animation completes |OnCommitSuggestedText| is 26 // selected text. When the animation completes |OnCommitSuggestedText| is
27 // invoked on the LocationBar. 27 // invoked on the LocationBar.
28 void StartAnimation(); 28 void StartAnimation();
29 29
30 // Stops the animation. 30 // Stops the animation.
31 void StopAnimation(); 31 void StopAnimation();
32 32
33 // View overrides: 33 // View overrides:
34 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; 34 virtual void OnPaintBackground(gfx::CanvasSkia* canvas) OVERRIDE;
35 35
36 // AnimationDelegate overrides: 36 // AnimationDelegate overrides:
37 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; 37 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
38 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 38 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
39 virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE; 39 virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE;
40 40
41 private: 41 private:
42 // Creates the animation to use. 42 // Creates the animation to use.
43 ui::Animation* CreateAnimation(); 43 ui::Animation* CreateAnimation();
44 44
45 // Resets the background color. 45 // Resets the background color.
46 void UpdateBackgroundColor(); 46 void UpdateBackgroundColor();
47 47
48 AutocompleteEditModel* edit_model_; 48 AutocompleteEditModel* edit_model_;
49 49
50 scoped_ptr<ui::Animation> animation_; 50 scoped_ptr<ui::Animation> animation_;
51 51
52 SkColor bg_color_; 52 SkColor bg_color_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(SuggestedTextView); 54 DISALLOW_COPY_AND_ASSIGN(SuggestedTextView);
55 }; 55 };
56 56
57 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SUGGESTED_TEXT_VIEW_H_ 57 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SUGGESTED_TEXT_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698