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/guest_view/app_view/chrome_app_view_guest_delegate.h" | 5 #include "chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.h" |
6 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" | 6 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" |
7 #include "components/renderer_context_menu/context_menu_delegate.h" | 7 #include "components/renderer_context_menu/context_menu_delegate.h" |
8 | 8 |
9 namespace extensions { | 9 namespace extensions { |
10 | 10 |
11 ChromeAppViewGuestDelegate::ChromeAppViewGuestDelegate() { | 11 ChromeAppViewGuestDelegate::ChromeAppViewGuestDelegate() { |
12 } | 12 } |
13 | 13 |
14 ChromeAppViewGuestDelegate::~ChromeAppViewGuestDelegate() { | 14 ChromeAppViewGuestDelegate::~ChromeAppViewGuestDelegate() { |
15 } | 15 } |
16 | 16 |
17 bool ChromeAppViewGuestDelegate::HandleContextMenu( | 17 bool ChromeAppViewGuestDelegate::HandleContextMenu( |
18 content::WebContents* web_contents, | 18 content::WebContents* web_contents, |
19 const content::ContextMenuParams& params) { | 19 const content::ContextMenuParams& params) { |
20 ContextMenuDelegate* menu_delegate = | 20 ContextMenuDelegate* menu_delegate = |
21 ContextMenuDelegate::FromWebContents(web_contents); | 21 ContextMenuDelegate::FromWebContents(web_contents); |
22 DCHECK(menu_delegate); | 22 DCHECK(menu_delegate); |
23 | 23 |
24 scoped_ptr<RenderViewContextMenu> menu = | 24 scoped_ptr<RenderViewContextMenuBase> menu = |
25 menu_delegate->BuildMenu(web_contents, params); | 25 menu_delegate->BuildMenu(web_contents, params); |
26 menu_delegate->ShowMenu(menu.Pass()); | 26 menu_delegate->ShowMenu(menu.Pass()); |
27 return true; | 27 return true; |
28 } | 28 } |
29 | 29 |
30 } // namespace extensions | 30 } // namespace extensions |
OLD | NEW |