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

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

Issue 8186: Plumb the referrer throughout the OpenURL APIs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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/profile_manager.cc ('k') | chrome/browser/render_view_host.h » ('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/render_view_context_menu_controller.h" 5 #include "chrome/browser/render_view_context_menu_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
(...skipping 29 matching lines...) Expand all
40 RenderViewContextMenuController::~RenderViewContextMenuController() { 40 RenderViewContextMenuController::~RenderViewContextMenuController() {
41 } 41 }
42 42
43 /////////////////////////////////////////////////////////////////////////////// 43 ///////////////////////////////////////////////////////////////////////////////
44 // Controller methods 44 // Controller methods
45 45
46 void RenderViewContextMenuController::OpenURL( 46 void RenderViewContextMenuController::OpenURL(
47 const GURL& url, 47 const GURL& url,
48 WindowOpenDisposition disposition, 48 WindowOpenDisposition disposition,
49 PageTransition::Type transition) { 49 PageTransition::Type transition) {
50 source_web_contents_->OpenURL(url, disposition, transition); 50 source_web_contents_->OpenURL(url, GURL(), disposition, transition);
51 } 51 }
52 52
53 void RenderViewContextMenuController::CopyImageAt(int x, int y) { 53 void RenderViewContextMenuController::CopyImageAt(int x, int y) {
54 source_web_contents_->render_view_host()->CopyImageAt(x, y); 54 source_web_contents_->render_view_host()->CopyImageAt(x, y);
55 } 55 }
56 56
57 void RenderViewContextMenuController::Inspect(int x, int y) { 57 void RenderViewContextMenuController::Inspect(int x, int y) {
58 source_web_contents_->render_view_host()->InspectElementAt(x, y); 58 source_web_contents_->render_view_host()->InspectElementAt(x, y);
59 } 59 }
60 60
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 if (id == IDS_CONTENT_CONTEXT_INSPECTELEMENT) { 444 if (id == IDS_CONTENT_CONTEXT_INSPECTELEMENT) {
445 PrefService* prefs = source_web_contents_->profile()->GetPrefs(); 445 PrefService* prefs = source_web_contents_->profile()->GetPrefs();
446 if (!prefs->GetBoolean(prefs::kWebKitJavascriptEnabled) || 446 if (!prefs->GetBoolean(prefs::kWebKitJavascriptEnabled) ||
447 command_line.HasSwitch(switches::kDisableJavaScript)) 447 command_line.HasSwitch(switches::kDisableJavaScript))
448 return false; 448 return false;
449 } 449 }
450 450
451 return true; 451 return true;
452 } 452 }
453 453
OLDNEW
« no previous file with comments | « chrome/browser/profile_manager.cc ('k') | chrome/browser/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698