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

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

Issue 2385363002: Pass the RenderProcessHost id on retargeting. (Closed)
Patch Set: Created 4 years, 2 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 #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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 1895 matching lines...) Expand 10 before | Expand all | Expand 10 after
1906 content::Source<RenderViewContextMenu>(this), 1906 content::Source<RenderViewContextMenu>(this),
1907 content::NotificationService::NoDetails()); 1907 content::NotificationService::NoDetails());
1908 } 1908 }
1909 1909
1910 void RenderViewContextMenu::NotifyURLOpened( 1910 void RenderViewContextMenu::NotifyURLOpened(
1911 const GURL& url, 1911 const GURL& url,
1912 content::WebContents* new_contents) { 1912 content::WebContents* new_contents) {
1913 RetargetingDetails details; 1913 RetargetingDetails details;
1914 details.source_web_contents = source_web_contents_; 1914 details.source_web_contents = source_web_contents_;
1915 // Don't use GetRenderFrameHost() as it may be NULL. crbug.com/399789 1915 // Don't use GetRenderFrameHost() as it may be NULL. crbug.com/399789
1916 details.source_render_process_id = render_process_host_id_;
1916 details.source_render_frame_id = render_frame_id_; 1917 details.source_render_frame_id = render_frame_id_;
1917 details.target_url = url; 1918 details.target_url = url;
1918 details.target_web_contents = new_contents; 1919 details.target_web_contents = new_contents;
1919 details.not_yet_in_tabstrip = false; 1920 details.not_yet_in_tabstrip = false;
1920 1921
1921 content::NotificationService::current()->Notify( 1922 content::NotificationService::current()->Notify(
1922 chrome::NOTIFICATION_RETARGETING, 1923 chrome::NOTIFICATION_RETARGETING,
1923 content::Source<Profile>(GetProfile()), 1924 content::Source<Profile>(GetProfile()),
1924 content::Details<RetargetingDetails>(&details)); 1925 content::Details<RetargetingDetails>(&details));
1925 } 1926 }
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
2455 void RenderViewContextMenu::PluginActionAt( 2456 void RenderViewContextMenu::PluginActionAt(
2456 const gfx::Point& location, 2457 const gfx::Point& location,
2457 const WebPluginAction& action) { 2458 const WebPluginAction& action) {
2458 source_web_contents_->GetRenderViewHost()-> 2459 source_web_contents_->GetRenderViewHost()->
2459 ExecutePluginActionAtLocation(location, action); 2460 ExecutePluginActionAtLocation(location, action);
2460 } 2461 }
2461 2462
2462 Browser* RenderViewContextMenu::GetBrowser() const { 2463 Browser* RenderViewContextMenu::GetBrowser() const {
2463 return chrome::FindBrowserWithWebContents(embedder_web_contents_); 2464 return chrome::FindBrowserWithWebContents(embedder_web_contents_);
2464 } 2465 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698