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

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

Issue 852043002: Initial Implementation of Download Notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build & test errors on non-ChromeOS platform. Created 5 years, 9 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
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 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 10 matching lines...) Expand all
21 class Rect; 21 class Rect;
22 } 22 }
23 23
24 namespace views { 24 namespace views {
25 class MenuRunner; 25 class MenuRunner;
26 class Widget; 26 class Widget;
27 } 27 }
28 28
29 class DownloadShelfContextMenuView : public DownloadShelfContextMenu { 29 class DownloadShelfContextMenuView : public DownloadShelfContextMenu {
30 public: 30 public:
31 DownloadShelfContextMenuView(content::DownloadItem* download_item, 31 explicit DownloadShelfContextMenuView(content::DownloadItem* download_item);
32 content::PageNavigator* navigator);
33 ~DownloadShelfContextMenuView() override; 32 ~DownloadShelfContextMenuView() override;
34 33
35 base::TimeTicks close_time() const { return close_time_; } 34 base::TimeTicks close_time() const { return close_time_; }
36 35
37 // |rect| is the bounding area for positioning the menu in screen coordinates. 36 // |rect| is the bounding area for positioning the menu in screen coordinates.
38 // The menu will be positioned above or below but not overlapping |rect|. 37 // The menu will be positioned above or below but not overlapping |rect|.
39 void Run(views::Widget* parent_widget, 38 void Run(views::Widget* parent_widget,
40 const gfx::Rect& rect, 39 const gfx::Rect& rect,
41 ui::MenuSourceType source_type); 40 ui::MenuSourceType source_type);
42 41
43 private: 42 private:
44 scoped_ptr<views::MenuRunner> menu_runner_; 43 scoped_ptr<views::MenuRunner> menu_runner_;
45 44
46 // Time the menu was closed. 45 // Time the menu was closed.
47 base::TimeTicks close_time_; 46 base::TimeTicks close_time_;
48 47
49 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenuView); 48 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenuView);
50 }; 49 };
51 50
52 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_VIEW_H_ 51 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698