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

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu.h

Issue 1760773004: Add "Open with <ARC-app-name>" items to the context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address dcheng's comment Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ 5 #ifndef CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_
6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ 6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 10 matching lines...) Expand all
21 #include "content/public/common/context_menu_params.h" 21 #include "content/public/common/context_menu_params.h"
22 #include "ui/base/models/simple_menu_model.h" 22 #include "ui/base/models/simple_menu_model.h"
23 #include "ui/base/window_open_disposition.h" 23 #include "ui/base/window_open_disposition.h"
24 #include "ui/gfx/geometry/vector2d.h" 24 #include "ui/gfx/geometry/vector2d.h"
25 25
26 #if defined(ENABLE_EXTENSIONS) 26 #if defined(ENABLE_EXTENSIONS)
27 #include "chrome/browser/extensions/context_menu_matcher.h" 27 #include "chrome/browser/extensions/context_menu_matcher.h"
28 #include "chrome/browser/extensions/menu_manager.h" 28 #include "chrome/browser/extensions/menu_manager.h"
29 #endif 29 #endif
30 30
31 class OpenWithMenuObserver;
31 class PrintPreviewContextMenuObserver; 32 class PrintPreviewContextMenuObserver;
32 class Profile; 33 class Profile;
33 class SpellingMenuObserver; 34 class SpellingMenuObserver;
34 class SpellingOptionsSubMenuObserver; 35 class SpellingOptionsSubMenuObserver;
35 36
36 namespace content { 37 namespace content {
37 class RenderFrameHost; 38 class RenderFrameHost;
38 class WebContents; 39 class WebContents;
39 } 40 }
40 41
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 void NotifyMenuShown() override; 116 void NotifyMenuShown() override;
116 void NotifyURLOpened(const GURL& url, 117 void NotifyURLOpened(const GURL& url,
117 content::WebContents* new_contents) override; 118 content::WebContents* new_contents) override;
118 119
119 // Gets the extension (if any) associated with the WebContents that we're in. 120 // Gets the extension (if any) associated with the WebContents that we're in.
120 const extensions::Extension* GetExtension() const; 121 const extensions::Extension* GetExtension() const;
121 122
122 void AppendDeveloperItems(); 123 void AppendDeveloperItems();
123 void AppendDevtoolsForUnpackedExtensions(); 124 void AppendDevtoolsForUnpackedExtensions();
124 void AppendLinkItems(); 125 void AppendLinkItems();
126 void AppendOpenWithLinkItems();
125 void AppendImageItems(); 127 void AppendImageItems();
126 void AppendAudioItems(); 128 void AppendAudioItems();
127 void AppendCanvasItems(); 129 void AppendCanvasItems();
128 void AppendVideoItems(); 130 void AppendVideoItems();
129 void AppendMediaItems(); 131 void AppendMediaItems();
130 void AppendPluginItems(); 132 void AppendPluginItems();
131 void AppendPageItems(); 133 void AppendPageItems();
132 void AppendCopyItem(); 134 void AppendCopyItem();
133 void AppendPrintItem(); 135 void AppendPrintItem();
134 void AppendMediaRouterItem(); 136 void AppendMediaRouterItem();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // "Ask Google for suggestions" items. 188 // "Ask Google for suggestions" items.
187 std::unique_ptr<SpellingMenuObserver> spelling_suggestions_menu_observer_; 189 std::unique_ptr<SpellingMenuObserver> spelling_suggestions_menu_observer_;
188 190
189 #if !defined(OS_MACOSX) 191 #if !defined(OS_MACOSX)
190 // An observer that handles the submenu for showing spelling options. This 192 // An observer that handles the submenu for showing spelling options. This
191 // submenu lets users select the spelling language, for example. 193 // submenu lets users select the spelling language, for example.
192 std::unique_ptr<SpellingOptionsSubMenuObserver> 194 std::unique_ptr<SpellingOptionsSubMenuObserver>
193 spelling_options_submenu_observer_; 195 spelling_options_submenu_observer_;
194 #endif 196 #endif
195 197
198 // An observer that handles "Open with <app>" items.
199 std::unique_ptr<RenderViewContextMenuObserver> open_with_menu_observer_;
200
196 #if defined(ENABLE_PRINT_PREVIEW) 201 #if defined(ENABLE_PRINT_PREVIEW)
197 // An observer that disables menu items when print preview is active. 202 // An observer that disables menu items when print preview is active.
198 std::unique_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; 203 std::unique_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_;
199 #endif 204 #endif
200 205
201 // In the case of a MimeHandlerView this will point to the WebContents that 206 // In the case of a MimeHandlerView this will point to the WebContents that
202 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as 207 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as
203 // |source_web_contents_|. 208 // |source_web_contents_|.
204 content::WebContents* const embedder_web_contents_; 209 content::WebContents* const embedder_web_contents_;
205 210
206 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); 211 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu);
207 }; 212 };
208 213
209 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ 214 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698