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

Side by Side Diff: chrome/browser/views/tabs/tab_renderer.h

Issue 113443: ChromeCanvas->gfx::Canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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/views/tabs/tab.cc ('k') | chrome/browser/views/tabs/tab_renderer.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_VIEWS_TABS_TAB_RENDERER_H__ 5 #ifndef CHROME_BROWSER_VIEWS_TABS_TAB_RENDERER_H__
6 #define CHROME_BROWSER_VIEWS_TABS_TAB_RENDERER_H__ 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_RENDERER_H__
7 7
8 #include "app/animation.h" 8 #include "app/animation.h"
9 #include "app/slide_animation.h" 9 #include "app/slide_animation.h"
10 #include "app/throb_animation.h" 10 #include "app/throb_animation.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const gfx::Rect& title_bounds() const { return title_bounds_; } 85 const gfx::Rect& title_bounds() const { return title_bounds_; }
86 86
87 // Returns the title of the Tab. 87 // Returns the title of the Tab.
88 std::wstring GetTitle() const; 88 std::wstring GetTitle() const;
89 89
90 // views::ButtonListener overrides: 90 // views::ButtonListener overrides:
91 virtual void ButtonPressed(views::Button* sender) {} 91 virtual void ButtonPressed(views::Button* sender) {}
92 92
93 private: 93 private:
94 // Overridden from views::View: 94 // Overridden from views::View:
95 virtual void Paint(ChromeCanvas* canvas); 95 virtual void Paint(gfx::Canvas* canvas);
96 virtual void Layout(); 96 virtual void Layout();
97 virtual void OnMouseEntered(const views::MouseEvent& event); 97 virtual void OnMouseEntered(const views::MouseEvent& event);
98 virtual void OnMouseExited(const views::MouseEvent& event); 98 virtual void OnMouseExited(const views::MouseEvent& event);
99 virtual void ThemeChanged(); 99 virtual void ThemeChanged();
100 100
101 // Overridden from AnimationDelegate: 101 // Overridden from AnimationDelegate:
102 virtual void AnimationProgressed(const Animation* animation); 102 virtual void AnimationProgressed(const Animation* animation);
103 virtual void AnimationCanceled(const Animation* animation); 103 virtual void AnimationCanceled(const Animation* animation);
104 virtual void AnimationEnded(const Animation* animation); 104 virtual void AnimationEnded(const Animation* animation);
105 105
106 // Starts/Stops the crash animation. 106 // Starts/Stops the crash animation.
107 void StartCrashAnimation(); 107 void StartCrashAnimation();
108 void StopCrashAnimation(); 108 void StopCrashAnimation();
109 109
110 // Return true if the crash animation is currently running. 110 // Return true if the crash animation is currently running.
111 bool IsPerformingCrashAnimation() const; 111 bool IsPerformingCrashAnimation() const;
112 112
113 // Set the temporary offset for the favicon. This is used during animation. 113 // Set the temporary offset for the favicon. This is used during animation.
114 void SetFavIconHidingOffset(int offset); 114 void SetFavIconHidingOffset(int offset);
115 115
116 void DisplayCrashedFavIcon(); 116 void DisplayCrashedFavIcon();
117 void ResetCrashedFavIcon(); 117 void ResetCrashedFavIcon();
118 118
119 // Paint various portions of the Tab 119 // Paint various portions of the Tab
120 void PaintTabBackground(ChromeCanvas* canvas); 120 void PaintTabBackground(gfx::Canvas* canvas);
121 void PaintInactiveTabBackground(ChromeCanvas* canvas); 121 void PaintInactiveTabBackground(gfx::Canvas* canvas);
122 void PaintActiveTabBackground(ChromeCanvas* canvas); 122 void PaintActiveTabBackground(gfx::Canvas* canvas);
123 void PaintHoverTabBackground(ChromeCanvas* canvas, double opacity); 123 void PaintHoverTabBackground(gfx::Canvas* canvas, double opacity);
124 void PaintLoadingAnimation(ChromeCanvas* canvas); 124 void PaintLoadingAnimation(gfx::Canvas* canvas);
125 125
126 // Returns the number of favicon-size elements that can fit in the tab's 126 // Returns the number of favicon-size elements that can fit in the tab's
127 // current size. 127 // current size.
128 int IconCapacity() const; 128 int IconCapacity() const;
129 129
130 // Returns whether the Tab should display a favicon. 130 // Returns whether the Tab should display a favicon.
131 bool ShouldShowIcon() const; 131 bool ShouldShowIcon() const;
132 132
133 // Returns whether the Tab should display a close button. 133 // Returns whether the Tab should display a close button.
134 bool ShouldShowCloseBox() const; 134 bool ShouldShowCloseBox() const;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 ThemeProvider* theme_provider_; 202 ThemeProvider* theme_provider_;
203 203
204 static void InitClass(); 204 static void InitClass();
205 static bool initialized_; 205 static bool initialized_;
206 206
207 DISALLOW_EVIL_CONSTRUCTORS(TabRenderer); 207 DISALLOW_EVIL_CONSTRUCTORS(TabRenderer);
208 }; 208 };
209 209
210 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_RENDERER_H__ 210 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_RENDERER_H__
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/tab.cc ('k') | chrome/browser/views/tabs/tab_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698