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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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
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 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1727 const base::CommandLine* command_line =
1728 base::CommandLine::ForCurrentProcess();
1728 if (!GetPrefs(browser_context_) 1729 if (!GetPrefs(browser_context_)
1729 ->GetBoolean(prefs::kWebKitJavascriptEnabled) || 1730 ->GetBoolean(prefs::kWebKitJavascriptEnabled) ||
1730 command_line->HasSwitch(switches::kDisableJavaScript)) 1731 command_line->HasSwitch(switches::kDisableJavaScript))
1731 return false; 1732 return false;
1732 1733
1733 // Don't enable the web inspector if the developer tools are disabled via 1734 // Don't enable the web inspector if the developer tools are disabled via
1734 // the preference dev-tools-disabled. 1735 // the preference dev-tools-disabled.
1735 if (GetPrefs(browser_context_)->GetBoolean(prefs::kDevToolsDisabled)) 1736 if (GetPrefs(browser_context_)->GetBoolean(prefs::kDevToolsDisabled))
1736 return false; 1737 return false;
1737 } 1738 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 source_web_contents_->GetRenderViewHost()-> 1783 source_web_contents_->GetRenderViewHost()->
1783 ExecuteMediaPlayerActionAtLocation(location, action); 1784 ExecuteMediaPlayerActionAtLocation(location, action);
1784 } 1785 }
1785 1786
1786 void RenderViewContextMenu::PluginActionAt( 1787 void RenderViewContextMenu::PluginActionAt(
1787 const gfx::Point& location, 1788 const gfx::Point& location,
1788 const WebPluginAction& action) { 1789 const WebPluginAction& action) {
1789 source_web_contents_->GetRenderViewHost()-> 1790 source_web_contents_->GetRenderViewHost()->
1790 ExecutePluginActionAtLocation(location, action); 1791 ExecutePluginActionAtLocation(location, action);
1791 } 1792 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698