OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 5 #include <algorithm> |
6 #include <set> | 6 #include <set> |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 9 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
10 | 10 |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 &menu_model_); | 723 &menu_model_); |
724 return total_items > 0; | 724 return total_items > 0; |
725 } | 725 } |
726 | 726 |
727 void RenderViewContextMenu::AppendDeveloperItems() { | 727 void RenderViewContextMenu::AppendDeveloperItems() { |
728 // Show Inspect Element in DevTools itself only in case of the debug | 728 // Show Inspect Element in DevTools itself only in case of the debug |
729 // devtools build. | 729 // devtools build. |
730 bool show_developer_items = !IsDevToolsURL(params_.page_url); | 730 bool show_developer_items = !IsDevToolsURL(params_.page_url); |
731 | 731 |
732 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 732 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
733 if (command_line.HasSwitch(switches::kDebugDevToolsFrontend) || | 733 if (command_line.HasSwitch(switches::kDebugDevToolsFrontend)) |
734 command_line.HasSwitch(switches::kDebugDevTools)) | |
735 show_developer_items = true; | 734 show_developer_items = true; |
736 | 735 |
737 #if defined(DEBUG_DEVTOOLS) | 736 #if defined(DEBUG_DEVTOOLS) |
738 show_developer_items = true; | 737 show_developer_items = true; |
739 #endif | 738 #endif |
740 | 739 |
741 if (!show_developer_items) | 740 if (!show_developer_items) |
742 return; | 741 return; |
743 | 742 |
744 // In the DevTools popup menu, "developer items" is normally the only | 743 // In the DevTools popup menu, "developer items" is normally the only |
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2010 source_web_contents_->GetRenderViewHost()-> | 2009 source_web_contents_->GetRenderViewHost()-> |
2011 ExecuteMediaPlayerActionAtLocation(location, action); | 2010 ExecuteMediaPlayerActionAtLocation(location, action); |
2012 } | 2011 } |
2013 | 2012 |
2014 void RenderViewContextMenu::PluginActionAt( | 2013 void RenderViewContextMenu::PluginActionAt( |
2015 const gfx::Point& location, | 2014 const gfx::Point& location, |
2016 const WebPluginAction& action) { | 2015 const WebPluginAction& action) { |
2017 source_web_contents_->GetRenderViewHost()-> | 2016 source_web_contents_->GetRenderViewHost()-> |
2018 ExecutePluginActionAtLocation(location, action); | 2017 ExecutePluginActionAtLocation(location, action); |
2019 } | 2018 } |
OLD | NEW |