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

Side by Side Diff: chrome/browser/views/download_shelf_view.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/download_item_view.cc ('k') | chrome/browser/views/download_shelf_view.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_DOWNLOAD_SHELF_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEWS_DOWNLOAD_SHELF_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_DOWNLOAD_SHELF_VIEW_H_ 6 #define CHROME_BROWSER_VIEWS_DOWNLOAD_SHELF_VIEW_H_
7 7
8 #include "app/slide_animation.h" 8 #include "app/slide_animation.h"
9 #include "chrome/browser/download/download_shelf.h" 9 #include "chrome/browser/download/download_shelf.h"
10 #include "views/controls/button/button.h" 10 #include "views/controls/button/button.h"
(...skipping 20 matching lines...) Expand all
31 public views::View, 31 public views::View,
32 public views::ButtonListener, 32 public views::ButtonListener,
33 public views::LinkController, 33 public views::LinkController,
34 public AnimationDelegate { 34 public AnimationDelegate {
35 public: 35 public:
36 explicit DownloadShelfView(TabContents* tab_contents); 36 explicit DownloadShelfView(TabContents* tab_contents);
37 37
38 // Implementation of View. 38 // Implementation of View.
39 virtual gfx::Size GetPreferredSize(); 39 virtual gfx::Size GetPreferredSize();
40 virtual void Layout(); 40 virtual void Layout();
41 virtual void Paint(ChromeCanvas* canvas); 41 virtual void Paint(gfx::Canvas* canvas);
42 42
43 // Implementation of AnimationDelegate. 43 // Implementation of AnimationDelegate.
44 virtual void AnimationProgressed(const Animation* animation); 44 virtual void AnimationProgressed(const Animation* animation);
45 virtual void AnimationEnded(const Animation* animation); 45 virtual void AnimationEnded(const Animation* animation);
46 46
47 // Implementation of LinkController. 47 // Implementation of LinkController.
48 // Invoked when the user clicks the 'show all downloads' link button. 48 // Invoked when the user clicks the 'show all downloads' link button.
49 virtual void LinkActivated(views::Link* source, int event_flags); 49 virtual void LinkActivated(views::Link* source, int event_flags);
50 50
51 // Implementation of ButtonListener. 51 // Implementation of ButtonListener.
(...skipping 11 matching lines...) Expand all
63 63
64 private: 64 private:
65 void Init(); 65 void Init();
66 66
67 // Adds a View representing a download to this DownloadShelfView. 67 // Adds a View representing a download to this DownloadShelfView.
68 // DownloadShelfView takes ownership of the View, and will delete it as 68 // DownloadShelfView takes ownership of the View, and will delete it as
69 // necessary. 69 // necessary.
70 void AddDownloadView(views::View* view); 70 void AddDownloadView(views::View* view);
71 71
72 // Paints the border. 72 // Paints the border.
73 void PaintBorder(ChromeCanvas* canvas); 73 void PaintBorder(gfx::Canvas* canvas);
74 74
75 // The animation for adding new items to the shelf. 75 // The animation for adding new items to the shelf.
76 scoped_ptr<SlideAnimation> new_item_animation_; 76 scoped_ptr<SlideAnimation> new_item_animation_;
77 77
78 // The show/hide animation for the shelf itself. 78 // The show/hide animation for the shelf itself.
79 scoped_ptr<SlideAnimation> shelf_animation_; 79 scoped_ptr<SlideAnimation> shelf_animation_;
80 80
81 // The download views. These are also child Views, and deleted when 81 // The download views. These are also child Views, and deleted when
82 // the DownloadShelfView is deleted. 82 // the DownloadShelfView is deleted.
83 std::vector<View*> download_views_; 83 std::vector<View*> download_views_;
84 84
85 // An image displayed on the right of the "Show all downloads..." link. 85 // An image displayed on the right of the "Show all downloads..." link.
86 views::ImageView* arrow_image_; 86 views::ImageView* arrow_image_;
87 87
88 // Link for showing all downloads. This is contained as a child, and deleted 88 // Link for showing all downloads. This is contained as a child, and deleted
89 // by View. 89 // by View.
90 views::Link* show_all_view_; 90 views::Link* show_all_view_;
91 91
92 // Button for closing the downloads. This is contained as a child, and 92 // Button for closing the downloads. This is contained as a child, and
93 // deleted by View. 93 // deleted by View.
94 views::ImageButton* close_button_; 94 views::ImageButton* close_button_;
95 95
96 DISALLOW_COPY_AND_ASSIGN(DownloadShelfView); 96 DISALLOW_COPY_AND_ASSIGN(DownloadShelfView);
97 }; 97 };
98 98
99 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_SHELF_VIEW_H_ 99 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_SHELF_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/download_item_view.cc ('k') | chrome/browser/views/download_shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698