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

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

Issue 260003: Move the clipboard stuff out of base and into app/clipboard. I renamed... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/tab_contents/render_view_context_menu.h" 5 #include "chrome/browser/tab_contents/render_view_context_menu.h"
6 6
7 #include "app/clipboard/clipboard.h"
8 #include "app/clipboard/scoped_clipboard_writer.h"
7 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
8 #include "base/clipboard.h"
9 #include "base/command_line.h" 10 #include "base/command_line.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/scoped_clipboard_writer.h"
12 #include "chrome/app/chrome_dll_resource.h" 12 #include "chrome/app/chrome_dll_resource.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/debugger/devtools_manager.h" 14 #include "chrome/browser/debugger/devtools_manager.h"
15 #include "chrome/browser/download/download_manager.h" 15 #include "chrome/browser/download/download_manager.h"
16 #include "chrome/browser/fonts_languages_window.h" 16 #include "chrome/browser/fonts_languages_window.h"
17 #include "chrome/browser/metrics/user_metrics.h" 17 #include "chrome/browser/metrics/user_metrics.h"
18 #include "chrome/browser/net/browser_url_util.h"
18 #include "chrome/browser/page_info_window.h" 19 #include "chrome/browser/page_info_window.h"
19 #include "chrome/browser/profile.h" 20 #include "chrome/browser/profile.h"
20 #include "chrome/browser/search_engines/template_url_model.h" 21 #include "chrome/browser/search_engines/template_url_model.h"
21 #include "chrome/browser/spellchecker.h" 22 #include "chrome/browser/spellchecker.h"
22 #include "chrome/browser/spellchecker_platform_engine.h" 23 #include "chrome/browser/spellchecker_platform_engine.h"
23 #include "chrome/browser/tab_contents/navigation_entry.h" 24 #include "chrome/browser/tab_contents/navigation_entry.h"
24 #include "chrome/browser/tab_contents/tab_contents.h" 25 #include "chrome/browser/tab_contents/tab_contents.h"
25 #include "chrome/common/chrome_switches.h" 26 #include "chrome/common/chrome_switches.h"
26 #include "chrome/common/platform_util.h" 27 #include "chrome/common/platform_util.h"
27 #include "chrome/common/pref_service.h" 28 #include "chrome/common/pref_service.h"
28 #include "chrome/common/url_constants.h" 29 #include "chrome/common/url_constants.h"
29 #include "grit/generated_resources.h" 30 #include "grit/generated_resources.h"
30 #include "net/base/escape.h" 31 #include "net/base/escape.h"
31 #include "net/base/net_util.h"
32 #include "webkit/glue/media_player_action.h" 32 #include "webkit/glue/media_player_action.h"
33 33
34 namespace { 34 namespace {
35 35
36 string16 EscapeAmpersands(const string16& text) { 36 string16 EscapeAmpersands(const string16& text) {
37 string16 ret; 37 string16 ret;
38 ret.reserve(text.length() * 2); 38 ret.reserve(text.length() * 2);
39 for (string16::const_iterator i = text.begin(); 39 for (string16::const_iterator i = text.begin();
40 i != text.end(); ++i) { 40 i != text.end(); ++i) {
41 // The escape for an ampersand is two ampersands. 41 // The escape for an ampersand is two ampersands.
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 void RenderViewContextMenu::CopyImageAt(int x, int y) { 795 void RenderViewContextMenu::CopyImageAt(int x, int y) {
796 source_tab_contents_->render_view_host()->CopyImageAt(x, y); 796 source_tab_contents_->render_view_host()->CopyImageAt(x, y);
797 } 797 }
798 798
799 void RenderViewContextMenu::Inspect(int x, int y) { 799 void RenderViewContextMenu::Inspect(int x, int y) {
800 DevToolsManager::GetInstance()->InspectElement( 800 DevToolsManager::GetInstance()->InspectElement(
801 source_tab_contents_->render_view_host(), x, y); 801 source_tab_contents_->render_view_host(), x, y);
802 } 802 }
803 803
804 void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) { 804 void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) {
805 net::WriteURLToClipboard( 805 chrome_browser_net::WriteURLToClipboard(
806 url, 806 url,
807 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), 807 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages),
808 g_browser_process->clipboard()); 808 g_browser_process->clipboard());
809 } 809 }
810 810
811 void RenderViewContextMenu::MediaPlayerActionAt( 811 void RenderViewContextMenu::MediaPlayerActionAt(
812 int x, 812 int x,
813 int y, 813 int y,
814 const MediaPlayerAction& action) { 814 const MediaPlayerAction& action) {
815 source_tab_contents_->render_view_host()->MediaPlayerActionAt(x, y, action); 815 source_tab_contents_->render_view_host()->MediaPlayerActionAt(x, y, action);
816 } 816 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter_gtk.cc ('k') | chrome/browser/tab_contents/web_drop_target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698