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

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: fix unit_tests Created 4 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 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 void NotifyMenuShown() override; 111 void NotifyMenuShown() override;
111 void NotifyURLOpened(const GURL& url, 112 void NotifyURLOpened(const GURL& url,
112 content::WebContents* new_contents) override; 113 content::WebContents* new_contents) override;
113 114
114 // Gets the extension (if any) associated with the WebContents that we're in. 115 // Gets the extension (if any) associated with the WebContents that we're in.
115 const extensions::Extension* GetExtension() const; 116 const extensions::Extension* GetExtension() const;
116 117
117 void AppendDeveloperItems(); 118 void AppendDeveloperItems();
118 void AppendDevtoolsForUnpackedExtensions(); 119 void AppendDevtoolsForUnpackedExtensions();
119 void AppendLinkItems(); 120 void AppendLinkItems();
121 void AppendOpenWithLinkItems();
120 void AppendImageItems(); 122 void AppendImageItems();
121 void AppendAudioItems(); 123 void AppendAudioItems();
122 void AppendCanvasItems(); 124 void AppendCanvasItems();
123 void AppendVideoItems(); 125 void AppendVideoItems();
124 void AppendMediaItems(); 126 void AppendMediaItems();
125 void AppendPluginItems(); 127 void AppendPluginItems();
126 void AppendPageItems(); 128 void AppendPageItems();
127 void AppendCopyItem(); 129 void AppendCopyItem();
128 void AppendPrintItem(); 130 void AppendPrintItem();
129 void AppendMediaRouterItem(); 131 void AppendMediaRouterItem();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // An observer that handles spelling suggestions, "Add to dictionary", and 182 // An observer that handles spelling suggestions, "Add to dictionary", and
181 // "Ask Google for suggestions" items. 183 // "Ask Google for suggestions" items.
182 scoped_ptr<SpellingMenuObserver> spelling_suggestions_menu_observer_; 184 scoped_ptr<SpellingMenuObserver> spelling_suggestions_menu_observer_;
183 185
184 #if !defined(OS_MACOSX) 186 #if !defined(OS_MACOSX)
185 // An observer that handles the submenu for showing spelling options. This 187 // An observer that handles the submenu for showing spelling options. This
186 // submenu lets users select the spelling language, for example. 188 // submenu lets users select the spelling language, for example.
187 scoped_ptr<SpellingOptionsSubMenuObserver> spelling_options_submenu_observer_; 189 scoped_ptr<SpellingOptionsSubMenuObserver> spelling_options_submenu_observer_;
188 #endif 190 #endif
189 191
192 // An observer that handles "Open with <app>" items.
193 scoped_ptr<OpenWithMenuObserver> open_with_menu_observer_;
194
190 #if defined(ENABLE_PRINT_PREVIEW) 195 #if defined(ENABLE_PRINT_PREVIEW)
191 // An observer that disables menu items when print preview is active. 196 // An observer that disables menu items when print preview is active.
192 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; 197 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_;
193 #endif 198 #endif
194 199
195 // In the case of a MimeHandlerView this will point to the WebContents that 200 // In the case of a MimeHandlerView this will point to the WebContents that
196 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as 201 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as
197 // |source_web_contents_|. 202 // |source_web_contents_|.
198 content::WebContents* const embedder_web_contents_; 203 content::WebContents* const embedder_web_contents_;
199 204
200 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); 205 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu);
201 }; 206 };
202 207
203 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ 208 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698