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

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

Issue 817123003: Remove commandline flag --disable-javascript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unsed variables Created 5 years, 11 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderer_context_menu/render_view_context_menu.h" 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 1717
1718 content::NotificationService::current()->Notify( 1718 content::NotificationService::current()->Notify(
1719 chrome::NOTIFICATION_RETARGETING, 1719 chrome::NOTIFICATION_RETARGETING,
1720 content::Source<Profile>(GetProfile()), 1720 content::Source<Profile>(GetProfile()),
1721 content::Details<RetargetingDetails>(&details)); 1721 content::Details<RetargetingDetails>(&details));
1722 } 1722 }
1723 1723
1724 bool RenderViewContextMenu::IsDevCommandEnabled(int id) const { 1724 bool RenderViewContextMenu::IsDevCommandEnabled(int id) const {
1725 if (id == IDC_CONTENT_CONTEXT_INSPECTELEMENT || 1725 if (id == IDC_CONTENT_CONTEXT_INSPECTELEMENT ||
1726 id == IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE) { 1726 id == IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE) {
1727 const base::CommandLine* command_line =
1728 base::CommandLine::ForCurrentProcess();
1729 if (!GetPrefs(browser_context_) 1727 if (!GetPrefs(browser_context_)
1730 ->GetBoolean(prefs::kWebKitJavascriptEnabled) || 1728 ->GetBoolean(prefs::kWebKitJavascriptEnabled))
1731 command_line->HasSwitch(switches::kDisableJavaScript))
1732 return false; 1729 return false;
1733 1730
1734 // Don't enable the web inspector if the developer tools are disabled via 1731 // Don't enable the web inspector if the developer tools are disabled via
1735 // the preference dev-tools-disabled. 1732 // the preference dev-tools-disabled.
1736 if (GetPrefs(browser_context_)->GetBoolean(prefs::kDevToolsDisabled)) 1733 if (GetPrefs(browser_context_)->GetBoolean(prefs::kDevToolsDisabled))
1737 return false; 1734 return false;
1738 } 1735 }
1739 1736
1740 return true; 1737 return true;
1741 } 1738 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 source_web_contents_->GetRenderViewHost()-> 1780 source_web_contents_->GetRenderViewHost()->
1784 ExecuteMediaPlayerActionAtLocation(location, action); 1781 ExecuteMediaPlayerActionAtLocation(location, action);
1785 } 1782 }
1786 1783
1787 void RenderViewContextMenu::PluginActionAt( 1784 void RenderViewContextMenu::PluginActionAt(
1788 const gfx::Point& location, 1785 const gfx::Point& location,
1789 const WebPluginAction& action) { 1786 const WebPluginAction& action) {
1790 source_web_contents_->GetRenderViewHost()-> 1787 source_web_contents_->GetRenderViewHost()->
1791 ExecutePluginActionAtLocation(location, action); 1788 ExecutePluginActionAtLocation(location, action);
1792 } 1789 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698