| 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 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1675 break; | 1675 break; |
| 1676 | 1676 |
| 1677 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: | 1677 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: |
| 1678 Inspect(params_.x, params_.y); | 1678 Inspect(params_.x, params_.y); |
| 1679 break; | 1679 break; |
| 1680 | 1680 |
| 1681 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: { | 1681 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: { |
| 1682 NavigationController* controller = &source_web_contents_->GetController(); | 1682 NavigationController* controller = &source_web_contents_->GetController(); |
| 1683 NavigationEntry* nav_entry = controller->GetActiveEntry(); | 1683 NavigationEntry* nav_entry = controller->GetActiveEntry(); |
| 1684 Browser* browser = Browser::GetBrowserForController(controller, NULL); | 1684 Browser* browser = Browser::GetBrowserForController(controller, NULL); |
| 1685 browser->ShowPageInfo(nav_entry->GetURL(), nav_entry->GetSSL(), true); | 1685 browser->ShowPageInfo(source_web_contents_, nav_entry->GetURL(), |
| 1686 nav_entry->GetSSL(), true); |
| 1686 break; | 1687 break; |
| 1687 } | 1688 } |
| 1688 | 1689 |
| 1689 case IDC_CONTENT_CONTEXT_TRANSLATE: { | 1690 case IDC_CONTENT_CONTEXT_TRANSLATE: { |
| 1690 // A translation might have been triggered by the time the menu got | 1691 // A translation might have been triggered by the time the menu got |
| 1691 // selected, do nothing in that case. | 1692 // selected, do nothing in that case. |
| 1692 TabContentsWrapper* tab_contents_wrapper = | 1693 TabContentsWrapper* tab_contents_wrapper = |
| 1693 TabContentsWrapper::GetCurrentWrapperForContents( | 1694 TabContentsWrapper::GetCurrentWrapperForContents( |
| 1694 source_web_contents_); | 1695 source_web_contents_); |
| 1695 if (!tab_contents_wrapper) | 1696 if (!tab_contents_wrapper) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1717 break; | 1718 break; |
| 1718 | 1719 |
| 1719 case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE: | 1720 case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE: |
| 1720 source_web_contents_->ViewFrameSource(params_.frame_url, | 1721 source_web_contents_->ViewFrameSource(params_.frame_url, |
| 1721 params_.frame_content_state); | 1722 params_.frame_content_state); |
| 1722 break; | 1723 break; |
| 1723 | 1724 |
| 1724 case IDC_CONTENT_CONTEXT_VIEWFRAMEINFO: { | 1725 case IDC_CONTENT_CONTEXT_VIEWFRAMEINFO: { |
| 1725 Browser* browser = Browser::GetBrowserForController( | 1726 Browser* browser = Browser::GetBrowserForController( |
| 1726 &source_web_contents_->GetController(), NULL); | 1727 &source_web_contents_->GetController(), NULL); |
| 1727 browser->ShowPageInfo(params_.frame_url, params_.security_info, false); | 1728 browser->ShowPageInfo(source_web_contents_, params_.frame_url, |
| 1729 params_.security_info, false); |
| 1728 break; | 1730 break; |
| 1729 } | 1731 } |
| 1730 | 1732 |
| 1731 case IDC_CONTENT_CONTEXT_UNDO: | 1733 case IDC_CONTENT_CONTEXT_UNDO: |
| 1732 rvh->Undo(); | 1734 rvh->Undo(); |
| 1733 break; | 1735 break; |
| 1734 | 1736 |
| 1735 case IDC_CONTENT_CONTEXT_REDO: | 1737 case IDC_CONTENT_CONTEXT_REDO: |
| 1736 rvh->Redo(); | 1738 rvh->Redo(); |
| 1737 break; | 1739 break; |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1986 source_web_contents_->GetRenderViewHost()-> | 1988 source_web_contents_->GetRenderViewHost()-> |
| 1987 ExecuteMediaPlayerActionAtLocation(location, action); | 1989 ExecuteMediaPlayerActionAtLocation(location, action); |
| 1988 } | 1990 } |
| 1989 | 1991 |
| 1990 void RenderViewContextMenu::PluginActionAt( | 1992 void RenderViewContextMenu::PluginActionAt( |
| 1991 const gfx::Point& location, | 1993 const gfx::Point& location, |
| 1992 const WebPluginAction& action) { | 1994 const WebPluginAction& action) { |
| 1993 source_web_contents_->GetRenderViewHost()-> | 1995 source_web_contents_->GetRenderViewHost()-> |
| 1994 ExecutePluginActionAtLocation(location, action); | 1996 ExecutePluginActionAtLocation(location, action); |
| 1995 } | 1997 } |
| OLD | NEW |