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

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 comments Created 4 years, 8 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 <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // An observer that handles spelling suggestions, "Add to dictionary", and 187 // An observer that handles spelling suggestions, "Add to dictionary", and
186 // "Ask Google for suggestions" items. 188 // "Ask Google for suggestions" items.
187 scoped_ptr<SpellingMenuObserver> spelling_suggestions_menu_observer_; 189 scoped_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 scoped_ptr<SpellingOptionsSubMenuObserver> spelling_options_submenu_observer_; 194 scoped_ptr<SpellingOptionsSubMenuObserver> spelling_options_submenu_observer_;
193 #endif 195 #endif
194 196
197 // An observer that handles "Open with <app>" items.
198 scoped_ptr<RenderViewContextMenuObserver> open_with_menu_observer_;
dcheng 2016/04/21 04:20:45 Nit: std::unique_ptr
Yusuke Sato 2016/04/22 05:27:48 Done.
199
195 #if defined(ENABLE_PRINT_PREVIEW) 200 #if defined(ENABLE_PRINT_PREVIEW)
196 // An observer that disables menu items when print preview is active. 201 // An observer that disables menu items when print preview is active.
197 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; 202 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_;
198 #endif 203 #endif
199 204
200 // In the case of a MimeHandlerView this will point to the WebContents that 205 // In the case of a MimeHandlerView this will point to the WebContents that
201 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as 206 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as
202 // |source_web_contents_|. 207 // |source_web_contents_|.
203 content::WebContents* const embedder_web_contents_; 208 content::WebContents* const embedder_web_contents_;
204 209
205 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); 210 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu);
206 }; 211 };
207 212
208 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ 213 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698