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