| OLD | NEW |
| 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 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" | 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
| 25 #include "chrome/browser/chrome_notification_types.h" | 25 #include "chrome/browser/chrome_notification_types.h" |
| 26 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" | 26 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" |
| 27 #include "chrome/browser/devtools/devtools_window.h" | 27 #include "chrome/browser/devtools/devtools_window.h" |
| 28 #include "chrome/browser/download/download_service.h" | 28 #include "chrome/browser/download/download_service.h" |
| 29 #include "chrome/browser/download/download_service_factory.h" | 29 #include "chrome/browser/download/download_service_factory.h" |
| 30 #include "chrome/browser/download/download_stats.h" | 30 #include "chrome/browser/download/download_stats.h" |
| 31 #include "chrome/browser/extensions/devtools_util.h" | 31 #include "chrome/browser/extensions/devtools_util.h" |
| 32 #include "chrome/browser/extensions/extension_service.h" | 32 #include "chrome/browser/extensions/extension_service.h" |
| 33 #include "chrome/browser/media/router/media_router_dialog_controller.h" | 33 #include "chrome/browser/media/router/media_router_dialog_controller.h" |
| 34 #include "chrome/browser/media/router/media_router_metrics.h" |
| 34 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 35 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| 35 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 36 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
| 36 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 37 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 37 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 38 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
| 38 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 39 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 39 #include "chrome/browser/profiles/profile.h" | 40 #include "chrome/browser/profiles/profile.h" |
| 40 #include "chrome/browser/profiles/profile_io_data.h" | 41 #include "chrome/browser/profiles/profile_io_data.h" |
| 41 #include "chrome/browser/renderer_context_menu/context_menu_content_type_factory
.h" | 42 #include "chrome/browser/renderer_context_menu/context_menu_content_type_factory
.h" |
| 42 #include "chrome/browser/renderer_context_menu/spelling_menu_observer.h" | 43 #include "chrome/browser/renderer_context_menu/spelling_menu_observer.h" |
| 43 #include "chrome/browser/search/search.h" | 44 #include "chrome/browser/search/search.h" |
| (...skipping 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1723 DCHECK(browser && !browser->profile()->IsOffTheRecord()); | 1724 DCHECK(browser && !browser->profile()->IsOffTheRecord()); |
| 1724 | 1725 |
| 1725 media_router::MediaRouterDialogController* dialog_controller = | 1726 media_router::MediaRouterDialogController* dialog_controller = |
| 1726 media_router::MediaRouterDialogController::GetOrCreateForWebContents( | 1727 media_router::MediaRouterDialogController::GetOrCreateForWebContents( |
| 1727 source_web_contents_); | 1728 source_web_contents_); |
| 1728 | 1729 |
| 1729 if (!dialog_controller) | 1730 if (!dialog_controller) |
| 1730 return; | 1731 return; |
| 1731 | 1732 |
| 1732 dialog_controller->ShowMediaRouterDialog(); | 1733 dialog_controller->ShowMediaRouterDialog(); |
| 1734 |
| 1735 media_router::MediaRouterMetrics::RecordMediaRouterDialogOrigin( |
| 1736 media_router::CONTEXTUAL_MENU); |
| 1737 |
| 1733 break; | 1738 break; |
| 1734 } | 1739 } |
| 1735 | 1740 |
| 1736 case IDC_VIEW_SOURCE: | 1741 case IDC_VIEW_SOURCE: |
| 1737 embedder_web_contents_->ViewSource(); | 1742 embedder_web_contents_->ViewSource(); |
| 1738 break; | 1743 break; |
| 1739 | 1744 |
| 1740 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: | 1745 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: |
| 1741 Inspect(params_.x, params_.y); | 1746 Inspect(params_.x, params_.y); |
| 1742 break; | 1747 break; |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1998 source_web_contents_->GetRenderViewHost()-> | 2003 source_web_contents_->GetRenderViewHost()-> |
| 1999 ExecuteMediaPlayerActionAtLocation(location, action); | 2004 ExecuteMediaPlayerActionAtLocation(location, action); |
| 2000 } | 2005 } |
| 2001 | 2006 |
| 2002 void RenderViewContextMenu::PluginActionAt( | 2007 void RenderViewContextMenu::PluginActionAt( |
| 2003 const gfx::Point& location, | 2008 const gfx::Point& location, |
| 2004 const WebPluginAction& action) { | 2009 const WebPluginAction& action) { |
| 2005 source_web_contents_->GetRenderViewHost()-> | 2010 source_web_contents_->GetRenderViewHost()-> |
| 2006 ExecutePluginActionAtLocation(location, action); | 2011 ExecutePluginActionAtLocation(location, action); |
| 2007 } | 2012 } |
| OLD | NEW |