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

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

Issue 39206: NO CODE CHANGE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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-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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/tab_contents/render_view_context_menu_controller.h" 7 #include "chrome/browser/tab_contents/render_view_context_menu_controller.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 case IDS_CONTENT_CONTEXT_OPENLINKOFFTHERECORD: 297 case IDS_CONTENT_CONTEXT_OPENLINKOFFTHERECORD:
298 OpenURL(params_.link_url, OFF_THE_RECORD, PageTransition::LINK); 298 OpenURL(params_.link_url, OFF_THE_RECORD, PageTransition::LINK);
299 break; 299 break;
300 300
301 // TODO(paulg): Prompt the user for file name when saving links and images. 301 // TODO(paulg): Prompt the user for file name when saving links and images.
302 case IDS_CONTENT_CONTEXT_SAVEIMAGEAS: 302 case IDS_CONTENT_CONTEXT_SAVEIMAGEAS:
303 case IDS_CONTENT_CONTEXT_SAVELINKAS: { 303 case IDS_CONTENT_CONTEXT_SAVELINKAS: {
304 const GURL& referrer = 304 const GURL& referrer =
305 params_.frame_url.is_empty() ? params_.page_url : params_.frame_url; 305 params_.frame_url.is_empty() ? params_.page_url : params_.frame_url;
306 const GURL& url = id == IDS_CONTENT_CONTEXT_SAVELINKAS ? params_.link_url : 306 const GURL& url =
307 params_.image_url ; 307 (id == IDS_CONTENT_CONTEXT_SAVELINKAS ? params_.link_url :
308 params_.image_url);
308 DownloadManager* dlm = 309 DownloadManager* dlm =
309 source_web_contents_->profile()->GetDownloadManager(); 310 source_web_contents_->profile()->GetDownloadManager();
310 dlm->DownloadUrl(url, referrer, source_web_contents_); 311 dlm->DownloadUrl(url, referrer, source_web_contents_);
311 break; 312 break;
312 } 313 }
313 314
314 case IDS_CONTENT_CONTEXT_COPYLINKLOCATION: 315 case IDS_CONTENT_CONTEXT_COPYLINKLOCATION:
315 WriteURLToClipboard(params_.link_url); 316 WriteURLToClipboard(params_.link_url);
316 break; 317 break;
317 318
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 // Don't enable the web inspector if JavaScript is disabled 538 // Don't enable the web inspector if JavaScript is disabled
538 if (id == IDS_CONTENT_CONTEXT_INSPECTELEMENT) { 539 if (id == IDS_CONTENT_CONTEXT_INSPECTELEMENT) {
539 PrefService* prefs = source_web_contents_->profile()->GetPrefs(); 540 PrefService* prefs = source_web_contents_->profile()->GetPrefs();
540 if (!prefs->GetBoolean(prefs::kWebKitJavascriptEnabled) || 541 if (!prefs->GetBoolean(prefs::kWebKitJavascriptEnabled) ||
541 command_line.HasSwitch(switches::kDisableJavaScript)) 542 command_line.HasSwitch(switches::kDisableJavaScript))
542 return false; 543 return false;
543 } 544 }
544 545
545 return true; 546 return true;
546 } 547 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/navigation_controller.cc ('k') | chrome/browser/tab_contents/site_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698