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

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

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "content/browser/download/download_stats.h" 57 #include "content/browser/download/download_stats.h"
58 #include "content/browser/download/save_package.h" 58 #include "content/browser/download/save_package.h"
59 #include "content/browser/renderer_host/render_view_host.h" 59 #include "content/browser/renderer_host/render_view_host.h"
60 #include "content/browser/renderer_host/render_widget_host_view.h" 60 #include "content/browser/renderer_host/render_widget_host_view.h"
61 #include "content/browser/speech/speech_input_preferences.h" 61 #include "content/browser/speech/speech_input_preferences.h"
62 #include "content/browser/tab_contents/navigation_details.h" 62 #include "content/browser/tab_contents/navigation_details.h"
63 #include "content/browser/tab_contents/navigation_entry.h" 63 #include "content/browser/tab_contents/navigation_entry.h"
64 #include "content/browser/tab_contents/tab_contents.h" 64 #include "content/browser/tab_contents/tab_contents.h"
65 #include "content/browser/user_metrics.h" 65 #include "content/browser/user_metrics.h"
66 #include "content/common/content_restriction.h" 66 #include "content/common/content_restriction.h"
67 #include "content/public/browser/notification_service.h"
67 #include "grit/generated_resources.h" 68 #include "grit/generated_resources.h"
68 #include "net/base/escape.h" 69 #include "net/base/escape.h"
69 #include "net/base/net_util.h" 70 #include "net/base/net_util.h"
70 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" 71 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
71 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction. h" 72 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction. h"
72 #include "ui/base/l10n/l10n_util.h" 73 #include "ui/base/l10n/l10n_util.h"
73 #include "ui/base/text/text_elider.h" 74 #include "ui/base/text/text_elider.h"
74 #include "ui/gfx/favicon_size.h" 75 #include "ui/gfx/favicon_size.h"
75 #include "webkit/glue/webmenuitem.h" 76 #include "webkit/glue/webmenuitem.h"
76 77
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after
1928 content::PageTransition transition) { 1929 content::PageTransition transition) {
1929 TabContents* new_contents = 1930 TabContents* new_contents =
1930 source_tab_contents_->OpenURL(url, referrer, disposition, transition); 1931 source_tab_contents_->OpenURL(url, referrer, disposition, transition);
1931 1932
1932 if (new_contents) { 1933 if (new_contents) {
1933 content::RetargetingDetails details; 1934 content::RetargetingDetails details;
1934 details.source_tab_contents = source_tab_contents_; 1935 details.source_tab_contents = source_tab_contents_;
1935 details.source_frame_id = frame_id; 1936 details.source_frame_id = frame_id;
1936 details.target_url = url; 1937 details.target_url = url;
1937 details.target_tab_contents = new_contents; 1938 details.target_tab_contents = new_contents;
1938 NotificationService::current()->Notify( 1939 content::NotificationService::current()->Notify(
1939 content::NOTIFICATION_RETARGETING, 1940 content::NOTIFICATION_RETARGETING,
1940 content::Source<content::BrowserContext>( 1941 content::Source<content::BrowserContext>(
1941 source_tab_contents_->browser_context()), 1942 source_tab_contents_->browser_context()),
1942 content::Details<content::RetargetingDetails>(&details)); 1943 content::Details<content::RetargetingDetails>(&details));
1943 } 1944 }
1944 } 1945 }
1945 1946
1946 void RenderViewContextMenu::CopyImageAt(int x, int y) { 1947 void RenderViewContextMenu::CopyImageAt(int x, int y) {
1947 source_tab_contents_->render_view_host()->CopyImageAt(x, y); 1948 source_tab_contents_->render_view_host()->CopyImageAt(x, y);
1948 } 1949 }
(...skipping 10 matching lines...) Expand all
1959 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), 1960 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages),
1960 g_browser_process->clipboard()); 1961 g_browser_process->clipboard());
1961 } 1962 }
1962 1963
1963 void RenderViewContextMenu::MediaPlayerActionAt( 1964 void RenderViewContextMenu::MediaPlayerActionAt(
1964 const gfx::Point& location, 1965 const gfx::Point& location,
1965 const WebMediaPlayerAction& action) { 1966 const WebMediaPlayerAction& action) {
1966 source_tab_contents_->render_view_host()-> 1967 source_tab_contents_->render_view_host()->
1967 ExecuteMediaPlayerActionAtLocation(location, action); 1968 ExecuteMediaPlayerActionAtLocation(location, action);
1968 } 1969 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698