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 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1754 content::RecordAction(UserMetricsAction("DevTools_InspectElement")); | 1754 content::RecordAction(UserMetricsAction("DevTools_InspectElement")); |
1755 RenderFrameHost* render_frame_host = GetRenderFrameHost(); | 1755 RenderFrameHost* render_frame_host = GetRenderFrameHost(); |
1756 if (!render_frame_host) | 1756 if (!render_frame_host) |
1757 return; | 1757 return; |
1758 DevToolsWindow::InspectElement( | 1758 DevToolsWindow::InspectElement( |
1759 WebContents::FromRenderFrameHost(render_frame_host), x, y); | 1759 WebContents::FromRenderFrameHost(render_frame_host), x, y); |
1760 } | 1760 } |
1761 | 1761 |
1762 void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) { | 1762 void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) { |
1763 chrome_common_net::WriteURLToClipboard( | 1763 chrome_common_net::WriteURLToClipboard( |
1764 url, | 1764 url, GetPrefs(browser_context_)->GetString(prefs::kAcceptLanguages)); |
1765 GetPrefs(browser_context_)->GetString(prefs::kAcceptLanguages), | |
1766 ui::Clipboard::GetForCurrentThread()); | |
1767 } | 1765 } |
1768 | 1766 |
1769 void RenderViewContextMenu::MediaPlayerActionAt( | 1767 void RenderViewContextMenu::MediaPlayerActionAt( |
1770 const gfx::Point& location, | 1768 const gfx::Point& location, |
1771 const WebMediaPlayerAction& action) { | 1769 const WebMediaPlayerAction& action) { |
1772 source_web_contents_->GetRenderViewHost()-> | 1770 source_web_contents_->GetRenderViewHost()-> |
1773 ExecuteMediaPlayerActionAtLocation(location, action); | 1771 ExecuteMediaPlayerActionAtLocation(location, action); |
1774 } | 1772 } |
1775 | 1773 |
1776 void RenderViewContextMenu::PluginActionAt( | 1774 void RenderViewContextMenu::PluginActionAt( |
1777 const gfx::Point& location, | 1775 const gfx::Point& location, |
1778 const WebPluginAction& action) { | 1776 const WebPluginAction& action) { |
1779 source_web_contents_->GetRenderViewHost()-> | 1777 source_web_contents_->GetRenderViewHost()-> |
1780 ExecutePluginActionAtLocation(location, action); | 1778 ExecutePluginActionAtLocation(location, action); |
1781 } | 1779 } |
OLD | NEW |