Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / views / download / download_shelf_context_menu_view.h
blobc2a21e64db153455b78aff8b9d143f40849b1eda
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
3 // found in the LICENSE file.
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_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/time/time.h"
12 #include "chrome/browser/download/download_shelf_context_menu.h"
13 #include "ui/base/ui_base_types.h"
15 namespace content {
16 class DownloadItem;
17 class PageNavigator;
20 namespace gfx {
21 class Rect;
24 namespace views {
25 class MenuRunner;
26 class Widget;
29 class DownloadShelfContextMenuView : public DownloadShelfContextMenu {
30 public:
31 DownloadShelfContextMenuView(content::DownloadItem* download_item,
32 content::PageNavigator* navigator);
33 virtual ~DownloadShelfContextMenuView();
35 base::TimeTicks close_time() const { return close_time_; }
37 // |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|.
39 void Run(views::Widget* parent_widget,
40 const gfx::Rect& rect,
41 ui::MenuSourceType source_type);
43 private:
44 scoped_ptr<views::MenuRunner> menu_runner_;
46 // Time the menu was closed.
47 base::TimeTicks close_time_;
49 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenuView);
52 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_VIEW_H_