| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |