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

Side by Side Diff: chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.cc

Issue 486903002: Moving app_view to extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/extensions/extension_service.h"
6 #include "chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.h"
7 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
8 #include "components/renderer_context_menu/context_menu_delegate.h"
9 #include "extensions/browser/extension_system.h"
10
11 namespace extensions {
12
13 ChromeAppViewGuestDelegate::ChromeAppViewGuestDelegate() {
14 }
15
16 ChromeAppViewGuestDelegate::~ChromeAppViewGuestDelegate() {
17 }
18
19 bool ChromeAppViewGuestDelegate::HandleContextMenu(
Xi Han 2014/08/18 21:29:11 Please rename it to OnHandleContextMenu.
20 content::WebContents* web_contents,
21 const content::ContextMenuParams& params) {
22 ContextMenuDelegate* menu_delegate =
23 ContextMenuDelegate::FromWebContents(web_contents);
24 DCHECK(menu_delegate);
25
26 scoped_ptr<RenderViewContextMenu> menu =
27 menu_delegate->BuildMenu(web_contents, params);
28 menu_delegate->ShowMenu(menu.Pass());
29 return true;
30 }
31
32 const Extension* ChromeAppViewGuestDelegate::GetExtensionById(
Xi Han 2014/08/18 21:29:11 Please remove this function.
33 content::BrowserContext* context,
34 const std::string& id,
35 bool include_disabled) const {
36 ExtensionService* service =
37 ExtensionSystem::Get(context)->extension_service();
38 return service->GetExtensionById(id, include_disabled);
39 }
40
41 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698