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

Side by Side Diff: chrome/browser/ui/views/download/download_shelf_context_menu_view.h

Issue 10421021: Make DownloadProtectionService not use BrowserList::GetLastActive() to load a link. Instead pass th… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/download/download_shelf_context_menu.h" 12 #include "chrome/browser/download/download_shelf_context_menu.h"
13 13
14 class BaseDownloadItemModel; 14 class BaseDownloadItemModel;
15 15
16 namespace content {
17 class PageNavigator;
18 }
19
16 namespace gfx { 20 namespace gfx {
17 class Rect; 21 class Rect;
18 } 22 }
19 23
20 namespace views { 24 namespace views {
21 class MenuRunner; 25 class MenuRunner;
22 class Widget; 26 class Widget;
23 } 27 }
24 28
25 class DownloadShelfContextMenuView : public DownloadShelfContextMenu { 29 class DownloadShelfContextMenuView : public DownloadShelfContextMenu {
26 public: 30 public:
27 explicit DownloadShelfContextMenuView(BaseDownloadItemModel* model); 31 DownloadShelfContextMenuView(BaseDownloadItemModel* model,
32 content::PageNavigator* navigator);
28 virtual ~DownloadShelfContextMenuView(); 33 virtual ~DownloadShelfContextMenuView();
29 34
30 // |rect| is the bounding area for positioning the menu in screen coordinates. 35 // |rect| is the bounding area for positioning the menu in screen coordinates.
31 // The menu will be positioned above or below but not overlapping |rect|. 36 // The menu will be positioned above or below but not overlapping |rect|.
32 void Run(views::Widget* parent_widget, const gfx::Rect& rect); 37 void Run(views::Widget* parent_widget, const gfx::Rect& rect);
33 38
34 private: 39 private:
35 scoped_ptr<views::MenuRunner> menu_runner_; 40 scoped_ptr<views::MenuRunner> menu_runner_;
36 41
37 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenuView); 42 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenuView);
38 }; 43 };
39 44
40 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_VIEW_H_ 45 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698