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

Side by Side Diff: chrome/browser/views/download_shelf_view.h

Issue 16488: Add a new resizer corner overlay. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 10 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) 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 "chrome/common/slide_animation.h" 8 #include "chrome/common/slide_animation.h"
9 #include "chrome/views/button.h" 9 #include "chrome/views/button.h"
10 #include "chrome/views/link.h" 10 #include "chrome/views/link.h"
(...skipping 13 matching lines...) Expand all
24 // To add a view representing a download to DownloadShelfView, invoke 24 // To add a view representing a download to DownloadShelfView, invoke
25 // AddDownloadView. AddDownloadView takes ownership of the passed in View. 25 // AddDownloadView. AddDownloadView takes ownership of the passed in View.
26 // DownloadShelfView does not hold an infinite number of download views, rather 26 // DownloadShelfView does not hold an infinite number of download views, rather
27 // it'll automatically remove views once a certain point is reached. As such, 27 // it'll automatically remove views once a certain point is reached. As such,
28 // the remove method is private. 28 // the remove method is private.
29 class DownloadShelfView : public views::View, 29 class DownloadShelfView : public views::View,
30 public views::BaseButton::ButtonListener, 30 public views::BaseButton::ButtonListener,
31 public views::LinkController, 31 public views::LinkController,
32 public AnimationDelegate { 32 public AnimationDelegate {
33 public: 33 public:
34 DownloadShelfView(TabContents* tab_contents); 34 explicit DownloadShelfView(TabContents* tab_contents);
35 35
36 // A new download has started, so add it to our shelf. 36 // A new download has started, so add it to our shelf.
37 void AddDownload(DownloadItem* download); 37 void AddDownload(DownloadItem* download);
38 38
39 virtual gfx::Size GetPreferredSize(); 39 virtual gfx::Size GetPreferredSize();
40 40
41 virtual void Layout(); 41 virtual void Layout();
42 42
43 // Invokes the following methods to do painting: 43 // Invokes the following methods to do painting:
44 // PaintBackground, PaintBorder and PaintSeparators. 44 // PaintBackground, PaintBorder and PaintSeparators.
(...skipping 16 matching lines...) Expand all
61 61
62 // Adds a View representing a download to this DownloadShelfView. 62 // Adds a View representing a download to this DownloadShelfView.
63 // DownloadShelfView takes ownership of the View, and will delete it as 63 // DownloadShelfView takes ownership of the View, and will delete it as
64 // necessary. 64 // necessary.
65 void AddDownloadView(views::View* view); 65 void AddDownloadView(views::View* view);
66 66
67 // Invoked when the download shelf is migrated from one tab contents to a new 67 // Invoked when the download shelf is migrated from one tab contents to a new
68 // one. 68 // one.
69 void ChangeTabContents(TabContents* old_contents, TabContents* new_contents); 69 void ChangeTabContents(TabContents* old_contents, TabContents* new_contents);
70 70
71 // The browser view needs to know when we are going away to properly return
72 // the resize corner size to WebKit so that we don't draw on top of it.
73 // This returns the showing state of our animation which is set to false at
74 // the beginning Show and true at the beginning of a Hide.
75 bool IsShowing() const;
76
71 private: 77 private:
72 void Init(); 78 void Init();
73 79
74 // Paints the border. 80 // Paints the border.
75 void PaintBorder(ChromeCanvas* canvas); 81 void PaintBorder(ChromeCanvas* canvas);
76 82
77 // Paints the separators. This invokes PaintSeparator to paint a particular 83 // Paints the separators. This invokes PaintSeparator to paint a particular
78 // separator. 84 // separator.
79 void PaintSeparators(ChromeCanvas* canvas); 85 void PaintSeparators(ChromeCanvas* canvas);
80 86
(...skipping 19 matching lines...) Expand all
100 // by View. 106 // by View.
101 views::Link* show_all_view_; 107 views::Link* show_all_view_;
102 108
103 // Button for closing the downloads. This is contained as a child, and 109 // Button for closing the downloads. This is contained as a child, and
104 // deleted by View. 110 // deleted by View.
105 views::Button* close_button_; 111 views::Button* close_button_;
106 112
107 DISALLOW_EVIL_CONSTRUCTORS(DownloadShelfView); 113 DISALLOW_EVIL_CONSTRUCTORS(DownloadShelfView);
108 }; 114 };
109 115
110 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_SHELF_VIEW_H__ 116 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_SHELF_VIEW_H__
111 117
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/web_contents.cc ('k') | chrome/browser/views/download_shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698