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

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 442303002: DevTools: migrate DevTools APIs to use WebContents instead of RenderViewHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for landing Created 6 years, 4 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 | Annotate | Revision Log
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 #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 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 kImageSearchThumbnailMinSize, 1756 kImageSearchThumbnailMinSize,
1757 gfx::Size(kImageSearchThumbnailMaxWidth, 1757 gfx::Size(kImageSearchThumbnailMaxWidth,
1758 kImageSearchThumbnailMaxHeight))); 1758 kImageSearchThumbnailMaxHeight)));
1759 } 1759 }
1760 1760
1761 void RenderViewContextMenu::Inspect(int x, int y) { 1761 void RenderViewContextMenu::Inspect(int x, int y) {
1762 content::RecordAction(UserMetricsAction("DevTools_InspectElement")); 1762 content::RecordAction(UserMetricsAction("DevTools_InspectElement"));
1763 RenderFrameHost* render_frame_host = GetRenderFrameHost(); 1763 RenderFrameHost* render_frame_host = GetRenderFrameHost();
1764 if (!render_frame_host) 1764 if (!render_frame_host)
1765 return; 1765 return;
1766 DevToolsWindow::InspectElement(render_frame_host->GetRenderViewHost(), x, y); 1766 DevToolsWindow::InspectElement(
1767 WebContents::FromRenderFrameHost(render_frame_host), x, y);
1767 } 1768 }
1768 1769
1769 void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) { 1770 void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) {
1770 chrome_common_net::WriteURLToClipboard( 1771 chrome_common_net::WriteURLToClipboard(
1771 url, 1772 url,
1772 GetPrefs(browser_context_)->GetString(prefs::kAcceptLanguages), 1773 GetPrefs(browser_context_)->GetString(prefs::kAcceptLanguages),
1773 ui::Clipboard::GetForCurrentThread()); 1774 ui::Clipboard::GetForCurrentThread());
1774 } 1775 }
1775 1776
1776 void RenderViewContextMenu::MediaPlayerActionAt( 1777 void RenderViewContextMenu::MediaPlayerActionAt(
1777 const gfx::Point& location, 1778 const gfx::Point& location,
1778 const WebMediaPlayerAction& action) { 1779 const WebMediaPlayerAction& action) {
1779 source_web_contents_->GetRenderViewHost()-> 1780 source_web_contents_->GetRenderViewHost()->
1780 ExecuteMediaPlayerActionAtLocation(location, action); 1781 ExecuteMediaPlayerActionAtLocation(location, action);
1781 } 1782 }
1782 1783
1783 void RenderViewContextMenu::PluginActionAt( 1784 void RenderViewContextMenu::PluginActionAt(
1784 const gfx::Point& location, 1785 const gfx::Point& location,
1785 const WebPluginAction& action) { 1786 const WebPluginAction& action) {
1786 source_web_contents_->GetRenderViewHost()-> 1787 source_web_contents_->GetRenderViewHost()->
1787 ExecutePluginActionAtLocation(location, action); 1788 ExecutePluginActionAtLocation(location, action);
1788 } 1789 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_dialog_cloud.cc ('k') | chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698