| 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/tab_contents/render_view_context_menu_controller.h" | 5 #include "chrome/browser/tab_contents/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/scoped_clipboard_writer.h" | 9 #include "base/scoped_clipboard_writer.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "chrome/common/clipboard_service.h" | 27 #include "chrome/common/clipboard_service.h" |
| 28 #include "chrome/common/l10n_util.h" | 28 #include "chrome/common/l10n_util.h" |
| 29 #include "chrome/common/win_util.h" | 29 #include "chrome/common/win_util.h" |
| 30 #include "net/base/escape.h" | 30 #include "net/base/escape.h" |
| 31 #include "net/base/net_util.h" | 31 #include "net/base/net_util.h" |
| 32 #include "net/url_request/url_request.h" | 32 #include "net/url_request/url_request.h" |
| 33 | 33 |
| 34 #include "generated_resources.h" | 34 #include "generated_resources.h" |
| 35 | 35 |
| 36 RenderViewContextMenuController::RenderViewContextMenuController( | 36 RenderViewContextMenuController::RenderViewContextMenuController( |
| 37 WebContents* source_web_contents, | 37 WebContents* source_web_contents, const ContextMenuParams& params) |
| 38 const ViewHostMsg_ContextMenu_Params& params) | |
| 39 : source_web_contents_(source_web_contents), | 38 : source_web_contents_(source_web_contents), |
| 40 params_(params) { | 39 params_(params) { |
| 41 } | 40 } |
| 42 | 41 |
| 43 RenderViewContextMenuController::~RenderViewContextMenuController() { | 42 RenderViewContextMenuController::~RenderViewContextMenuController() { |
| 44 } | 43 } |
| 45 | 44 |
| 46 /////////////////////////////////////////////////////////////////////////////// | 45 /////////////////////////////////////////////////////////////////////////////// |
| 47 // Controller methods | 46 // Controller methods |
| 48 | 47 |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 if (id == IDS_CONTENT_CONTEXT_INSPECTELEMENT) { | 506 if (id == IDS_CONTENT_CONTEXT_INSPECTELEMENT) { |
| 508 PrefService* prefs = source_web_contents_->profile()->GetPrefs(); | 507 PrefService* prefs = source_web_contents_->profile()->GetPrefs(); |
| 509 if (!prefs->GetBoolean(prefs::kWebKitJavascriptEnabled) || | 508 if (!prefs->GetBoolean(prefs::kWebKitJavascriptEnabled) || |
| 510 command_line.HasSwitch(switches::kDisableJavaScript)) | 509 command_line.HasSwitch(switches::kDisableJavaScript)) |
| 511 return false; | 510 return false; |
| 512 } | 511 } |
| 513 | 512 |
| 514 return true; | 513 return true; |
| 515 } | 514 } |
| 516 | 515 |
| OLD | NEW |