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

Unified Diff: chrome/browser/ui/views/download/download_shelf_context_menu_view.h

Issue 7056001: views: Split DownloadShelfContextMenuWin out to its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: asanka review Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/download/download_shelf_context_menu_view.h
diff --git a/chrome/browser/ui/views/download/download_shelf_context_menu_view.h b/chrome/browser/ui/views/download/download_shelf_context_menu_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..1266005a0c6cdb2d4a6fe3a9bed57e0a3d9ecc56
--- /dev/null
+++ b/chrome/browser/ui/views/download/download_shelf_context_menu_view.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_VIEW_H_
+#define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_VIEW_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/download/download_shelf_context_menu.h"
+
+class BaseDownloadItemModel;
+
+namespace gfx {
+class Point;
+}
+
+namespace views {
+class Menu2;
+}
+
+class DownloadShelfContextMenuView : public DownloadShelfContextMenu {
+ public:
+ explicit DownloadShelfContextMenuView(BaseDownloadItemModel* model);
+ virtual ~DownloadShelfContextMenuView();
+
+ void Run(const gfx::Point& point);
+
+ // This method runs when the caller has been deleted and we should not attempt
+ // to access download_item().
+ void Stop();
+
+ private:
+ scoped_ptr<views::Menu2> menu_;
+
+ DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenuView);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_CONTEXT_MENU_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698