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

Side by Side Diff: chrome/browser/views/star_toggle.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/shell_dialogs_win.cc ('k') | chrome/browser/views/star_toggle.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_STAR_TOGGLE_H_ 5 #ifndef CHROME_BROWSER_VIEWS_STAR_TOGGLE_H_
6 #define CHROME_BROWSER_VIEWS_STAR_TOGGLE_H_ 6 #define CHROME_BROWSER_VIEWS_STAR_TOGGLE_H_
7 7
8 #include "views/view.h" 8 #include "views/view.h"
9 #include "views/event.h" 9 #include "views/event.h"
10 10
(...skipping 24 matching lines...) Expand all
35 // If false, on mouse release the delegate is notified, but the state is not 35 // If false, on mouse release the delegate is notified, but the state is not
36 // changed. 36 // changed.
37 void set_change_state_immediately(bool value) { 37 void set_change_state_immediately(bool value) {
38 change_state_immediately_ = value; 38 change_state_immediately_ = value;
39 } 39 }
40 40
41 // Check/uncheck the star. 41 // Check/uncheck the star.
42 void SwitchState(); 42 void SwitchState();
43 43
44 // Overriden from view. 44 // Overriden from view.
45 void Paint(ChromeCanvas* canvas); 45 void Paint(gfx::Canvas* canvas);
46 gfx::Size GetPreferredSize(); 46 gfx::Size GetPreferredSize();
47 virtual bool OnMousePressed(const views::MouseEvent& e); 47 virtual bool OnMousePressed(const views::MouseEvent& e);
48 virtual bool OnMouseDragged(const views::MouseEvent& event); 48 virtual bool OnMouseDragged(const views::MouseEvent& event);
49 virtual void OnMouseReleased(const views::MouseEvent& e, bool canceled); 49 virtual void OnMouseReleased(const views::MouseEvent& e, bool canceled);
50 bool OnKeyPressed(const views::KeyEvent& e); 50 bool OnKeyPressed(const views::KeyEvent& e);
51 51
52 private: 52 private:
53 // The state. 53 // The state.
54 bool state_; 54 bool state_;
55 55
56 // Our bitmap. 56 // Our bitmap.
57 SkBitmap* state_off_; 57 SkBitmap* state_off_;
58 SkBitmap* state_on_; 58 SkBitmap* state_on_;
59 59
60 // Parent to be notified. 60 // Parent to be notified.
61 Delegate* delegate_; 61 Delegate* delegate_;
62 62
63 // See note in setter. 63 // See note in setter.
64 bool change_state_immediately_; 64 bool change_state_immediately_;
65 65
66 DISALLOW_EVIL_CONSTRUCTORS(StarToggle); 66 DISALLOW_EVIL_CONSTRUCTORS(StarToggle);
67 }; 67 };
68 68
69 #endif // CHROME_BROWSER_VIEWS_STAR_TOGGLE_H_ 69 #endif // CHROME_BROWSER_VIEWS_STAR_TOGGLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/shell_dialogs_win.cc ('k') | chrome/browser/views/star_toggle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698