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

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

Issue 7622012: Removal of Profile from content part 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <algorithm> 5 #include <algorithm>
6 #include <set> 6 #include <set>
7 7
8 #include "chrome/browser/tab_contents/render_view_context_menu.h" 8 #include "chrome/browser/tab_contents/render_view_context_menu.h"
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 PageTransition::Type transition) { 1801 PageTransition::Type transition) {
1802 TabContents* new_contents = 1802 TabContents* new_contents =
1803 source_tab_contents_->OpenURL(url, referrer, disposition, transition); 1803 source_tab_contents_->OpenURL(url, referrer, disposition, transition);
1804 1804
1805 if (new_contents) { 1805 if (new_contents) {
1806 content::RetargetingDetails details; 1806 content::RetargetingDetails details;
1807 details.source_tab_contents = source_tab_contents_; 1807 details.source_tab_contents = source_tab_contents_;
1808 details.source_frame_id = frame_id; 1808 details.source_frame_id = frame_id;
1809 details.target_url = url; 1809 details.target_url = url;
1810 details.target_tab_contents = new_contents; 1810 details.target_tab_contents = new_contents;
1811 Profile* profile =
1812 Profile::FromBrowserContext(source_tab_contents_->browser_context());
1813 NotificationService::current()->Notify( 1811 NotificationService::current()->Notify(
1814 content::NOTIFICATION_RETARGETING, 1812 content::NOTIFICATION_RETARGETING,
1815 Source<Profile>(profile), 1813 Source<content::BrowserContext>(
1814 source_tab_contents_->browser_context()),
1816 Details<content::RetargetingDetails>(&details)); 1815 Details<content::RetargetingDetails>(&details));
1817 } 1816 }
1818 } 1817 }
1819 1818
1820 void RenderViewContextMenu::CopyImageAt(int x, int y) { 1819 void RenderViewContextMenu::CopyImageAt(int x, int y) {
1821 RenderViewHost* rvh = source_tab_contents_->render_view_host(); 1820 RenderViewHost* rvh = source_tab_contents_->render_view_host();
1822 rvh->Send(new ViewMsg_CopyImageAt(rvh->routing_id(), x, y)); 1821 rvh->Send(new ViewMsg_CopyImageAt(rvh->routing_id(), x, y));
1823 } 1822 }
1824 1823
1825 void RenderViewContextMenu::Inspect(int x, int y) { 1824 void RenderViewContextMenu::Inspect(int x, int y) {
1826 UserMetrics::RecordAction(UserMetricsAction("DevTools_InspectElement")); 1825 UserMetrics::RecordAction(UserMetricsAction("DevTools_InspectElement"));
1827 DevToolsWindow::InspectElement( 1826 DevToolsWindow::InspectElement(
1828 source_tab_contents_->render_view_host(), x, y); 1827 source_tab_contents_->render_view_host(), x, y);
1829 } 1828 }
1830 1829
1831 void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) { 1830 void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) {
1832 chrome_browser_net::WriteURLToClipboard( 1831 chrome_browser_net::WriteURLToClipboard(
1833 url, 1832 url,
1834 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), 1833 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages),
1835 g_browser_process->clipboard()); 1834 g_browser_process->clipboard());
1836 } 1835 }
1837 1836
1838 void RenderViewContextMenu::MediaPlayerActionAt( 1837 void RenderViewContextMenu::MediaPlayerActionAt(
1839 const gfx::Point& location, 1838 const gfx::Point& location,
1840 const WebMediaPlayerAction& action) { 1839 const WebMediaPlayerAction& action) {
1841 RenderViewHost* rvh = source_tab_contents_->render_view_host(); 1840 RenderViewHost* rvh = source_tab_contents_->render_view_host();
1842 rvh->Send(new ViewMsg_MediaPlayerActionAt( 1841 rvh->Send(new ViewMsg_MediaPlayerActionAt(
1843 rvh->routing_id(), location, action)); 1842 rvh->routing_id(), location, action));
1844 } 1843 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698