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

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

Issue 101026: Change chrome-ui to chrome. I didn't go too far in converting existing string... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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
« no previous file with comments | « chrome/browser/resources/new_tab.html ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/clipboard.h" 7 #include "base/clipboard.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/scoped_clipboard_writer.h" 10 #include "base/scoped_clipboard_writer.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 case IDS_CONTENT_CONTEXT_SAVEIMAGEAS: 233 case IDS_CONTENT_CONTEXT_SAVEIMAGEAS:
234 return params_.image_url.is_valid() && 234 return params_.image_url.is_valid() &&
235 URLRequest::IsHandledURL(params_.image_url); 235 URLRequest::IsHandledURL(params_.image_url);
236 236
237 case IDS_CONTENT_CONTEXT_OPENIMAGENEWTAB: 237 case IDS_CONTENT_CONTEXT_OPENIMAGENEWTAB:
238 // The images shown in the most visited thumbnails do not currently open 238 // The images shown in the most visited thumbnails do not currently open
239 // in a new tab as they should. Disabling this context menu option for 239 // in a new tab as they should. Disabling this context menu option for
240 // now, as a quick hack, before we resolve this issue (Issue = 2608). 240 // now, as a quick hack, before we resolve this issue (Issue = 2608).
241 // TODO (sidchat): Enable this option once this issue is resolved. 241 // TODO (sidchat): Enable this option once this issue is resolved.
242 if (params_.image_url.scheme() == "chrome-ui") 242 if (params_.image_url.scheme() == chrome::kChromeUIScheme)
243 return false; 243 return false;
244 return true; 244 return true;
245 245
246 case IDS_CONTENT_CONTEXT_COPYIMAGELOCATION: 246 case IDS_CONTENT_CONTEXT_COPYIMAGELOCATION:
247 return params_.image_url.is_valid(); 247 return params_.image_url.is_valid();
248 248
249 case IDS_CONTENT_CONTEXT_SAVEPAGEAS: 249 case IDS_CONTENT_CONTEXT_SAVEPAGEAS:
250 return SavePackage::IsSavableURL(source_tab_contents_->GetURL()); 250 return SavePackage::IsSavableURL(source_tab_contents_->GetURL());
251 251
252 case IDS_CONTENT_CONTEXT_OPENFRAMENEWTAB: 252 case IDS_CONTENT_CONTEXT_OPENFRAMENEWTAB:
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 ScopedClipboardWriter scw(clipboard); 655 ScopedClipboardWriter scw(clipboard);
656 scw.WriteText(text); 656 scw.WriteText(text);
657 } 657 }
658 658
659 void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) { 659 void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) {
660 if (url.SchemeIs(chrome::kMailToScheme)) 660 if (url.SchemeIs(chrome::kMailToScheme))
661 WriteTextToClipboard(UTF8ToUTF16(url.path())); 661 WriteTextToClipboard(UTF8ToUTF16(url.path()));
662 else 662 else
663 WriteTextToClipboard(UTF8ToUTF16(url.spec())); 663 WriteTextToClipboard(UTF8ToUTF16(url.spec()));
664 } 664 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/new_tab.html ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698