OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 9 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 #include "content/public/browser/render_widget_host_view.h" | 74 #include "content/public/browser/render_widget_host_view.h" |
75 #include "content/public/browser/user_metrics.h" | 75 #include "content/public/browser/user_metrics.h" |
76 #include "content/public/browser/web_contents.h" | 76 #include "content/public/browser/web_contents.h" |
77 #include "content/public/common/content_restriction.h" | 77 #include "content/public/common/content_restriction.h" |
78 #include "content/public/common/ssl_status.h" | 78 #include "content/public/common/ssl_status.h" |
79 #include "grit/generated_resources.h" | 79 #include "grit/generated_resources.h" |
80 #include "net/base/escape.h" | 80 #include "net/base/escape.h" |
81 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" | 81 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" |
82 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" | 82 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" |
83 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginAction.h" | 83 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginAction.h" |
| 84 #include "ui/base/clipboard/clipboard.h" |
84 #include "ui/base/l10n/l10n_util.h" | 85 #include "ui/base/l10n/l10n_util.h" |
85 #include "ui/base/text/text_elider.h" | 86 #include "ui/base/text/text_elider.h" |
86 #include "ui/gfx/favicon_size.h" | 87 #include "ui/gfx/favicon_size.h" |
87 #include "webkit/glue/webmenuitem.h" | 88 #include "webkit/glue/webmenuitem.h" |
88 | 89 |
89 #ifdef FILE_MANAGER_EXTENSION | 90 #ifdef FILE_MANAGER_EXTENSION |
90 #include "chrome/browser/chromeos/extensions/file_manager_util.h" | 91 #include "chrome/browser/chromeos/extensions/file_manager_util.h" |
91 #endif | 92 #endif |
92 | 93 |
93 using WebKit::WebContextMenuData; | 94 using WebKit::WebContextMenuData; |
(...skipping 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2007 void RenderViewContextMenu::Inspect(int x, int y) { | 2008 void RenderViewContextMenu::Inspect(int x, int y) { |
2008 content::RecordAction(UserMetricsAction("DevTools_InspectElement")); | 2009 content::RecordAction(UserMetricsAction("DevTools_InspectElement")); |
2009 DevToolsWindow::InspectElement( | 2010 DevToolsWindow::InspectElement( |
2010 source_web_contents_->GetRenderViewHost(), x, y); | 2011 source_web_contents_->GetRenderViewHost(), x, y); |
2011 } | 2012 } |
2012 | 2013 |
2013 void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) { | 2014 void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) { |
2014 chrome_common_net::WriteURLToClipboard( | 2015 chrome_common_net::WriteURLToClipboard( |
2015 url, | 2016 url, |
2016 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), | 2017 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), |
2017 g_browser_process->clipboard()); | 2018 ui::Clipboard::GetForCurrentThread()); |
2018 } | 2019 } |
2019 | 2020 |
2020 void RenderViewContextMenu::MediaPlayerActionAt( | 2021 void RenderViewContextMenu::MediaPlayerActionAt( |
2021 const gfx::Point& location, | 2022 const gfx::Point& location, |
2022 const WebMediaPlayerAction& action) { | 2023 const WebMediaPlayerAction& action) { |
2023 source_web_contents_->GetRenderViewHost()-> | 2024 source_web_contents_->GetRenderViewHost()-> |
2024 ExecuteMediaPlayerActionAtLocation(location, action); | 2025 ExecuteMediaPlayerActionAtLocation(location, action); |
2025 } | 2026 } |
2026 | 2027 |
2027 void RenderViewContextMenu::PluginActionAt( | 2028 void RenderViewContextMenu::PluginActionAt( |
2028 const gfx::Point& location, | 2029 const gfx::Point& location, |
2029 const WebPluginAction& action) { | 2030 const WebPluginAction& action) { |
2030 source_web_contents_->GetRenderViewHost()-> | 2031 source_web_contents_->GetRenderViewHost()-> |
2031 ExecutePluginActionAtLocation(location, action); | 2032 ExecutePluginActionAtLocation(location, action); |
2032 } | 2033 } |
OLD | NEW |