OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 Profile* profile_; | 183 Profile* profile_; |
184 | 184 |
185 ui::SimpleMenuModel menu_model_; | 185 ui::SimpleMenuModel menu_model_; |
186 extensions::ContextMenuMatcher extension_items_; | 186 extensions::ContextMenuMatcher extension_items_; |
187 | 187 |
188 // True if we are showing for an external tab contents. The default is false. | 188 // True if we are showing for an external tab contents. The default is false. |
189 bool external_; | 189 bool external_; |
190 | 190 |
191 private: | 191 private: |
192 friend class RenderViewContextMenuTest; | 192 friend class RenderViewContextMenuTest; |
| 193 friend class RenderViewContextMenuPrefsTest; |
193 | 194 |
194 static bool IsDevToolsURL(const GURL& url); | 195 static bool IsDevToolsURL(const GURL& url); |
195 static bool IsInternalResourcesURL(const GURL& url); | 196 static bool IsInternalResourcesURL(const GURL& url); |
196 static bool ExtensionContextAndPatternMatch( | 197 static bool ExtensionContextAndPatternMatch( |
197 const content::ContextMenuParams& params, | 198 const content::ContextMenuParams& params, |
198 extensions::MenuItem::ContextList contexts, | 199 extensions::MenuItem::ContextList contexts, |
199 const extensions::URLPatternSet& target_url_patterns); | 200 const extensions::URLPatternSet& target_url_patterns); |
200 static bool MenuItemMatchesParams( | 201 static bool MenuItemMatchesParams( |
201 const content::ContextMenuParams& params, | 202 const content::ContextMenuParams& params, |
202 const extensions::MenuItem* item); | 203 const extensions::MenuItem* item); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 // An observer that disables menu items when print preview is active. | 275 // An observer that disables menu items when print preview is active. |
275 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; | 276 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; |
276 | 277 |
277 // Our observers. | 278 // Our observers. |
278 mutable ObserverList<RenderViewContextMenuObserver> observers_; | 279 mutable ObserverList<RenderViewContextMenuObserver> observers_; |
279 | 280 |
280 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 281 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
281 }; | 282 }; |
282 | 283 |
283 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 284 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |