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

Unified Diff: chrome/browser/views/download_tab_view.h

Issue 13278: Context menu key should work on download page... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 12 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/views/download_tab_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/download_tab_view.h
===================================================================
--- chrome/browser/views/download_tab_view.h (revision 6493)
+++ chrome/browser/views/download_tab_view.h (working copy)
@@ -26,6 +26,7 @@
class DownloadItemTabView : public views::View,
public views::LinkController,
+ public views::ContextMenuController,
public views::NativeButton::Listener {
public:
DownloadItemTabView();
@@ -36,9 +37,18 @@
virtual void Paint(ChromeCanvas* canvas);
void PaintBackground(ChromeCanvas* canvas);
virtual gfx::Size GetPreferredSize();
+ virtual bool CanProcessTabKeyEvents();
+ virtual bool OnKeyPressed(const views::KeyEvent& event);
virtual bool OnMousePressed(const views::MouseEvent& event);
virtual bool OnMouseDragged(const views::MouseEvent& event);
+ // Invoked for this View, one of the buttons or the 'other' button. Shows the
+ // appropriate context menu.
+ virtual void ShowContextMenu(views::View* source,
+ int x,
+ int y,
+ bool is_mouse_gesture);
+
// Mode specific layouts
void LayoutDate();
void LayoutComplete();
@@ -148,12 +158,18 @@
bool is_horizontal, bool is_positive);
int start_angle() const { return start_angle_; }
-
+ int selected_index() const { return selected_index_; }
+ int total_downloads() const { return static_cast<int>(downloads_.size()); }
+
// Called by a DownloadItemTabView when it becomes selected. Passing a NULL
// for 'download' causes any selected download to become unselected.
void ItemBecameSelected(const DownloadItem* download);
bool ItemIsSelected(DownloadItem* download);
+ // Called by a DownloadItemTabView when navigating between download items.
+ // Passing a -1 for |index| will select the newest item in the download list.
+ void SelectItemAtIndex(int index);
+
// The destination view's search box text has changed.
void SetSearchText(const std::wstring& search_text);
« no previous file with comments | « no previous file | chrome/browser/views/download_tab_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698