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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_guest_delegate.h

Issue 496873006: Move core web_view code to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
OLDNEW
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 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_ 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_ 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_
7 7
8 #include "extensions/browser/guest_view/guest_view_base.h" 8 #include "extensions/browser/guest_view/guest_view_base.h"
9 9
10 namespace content { 10 namespace content {
11 class RenderViewHost; 11 class RenderViewHost;
12 class WebContents; 12 class WebContents;
13 } 13 }
14 14
15 namespace extensions { 15 namespace extensions {
16 16
17 class WebViewGuest;
18
17 namespace api { 19 namespace api {
18 namespace web_view_internal{ 20 namespace web_view_internal{
19 21
20 struct ContextMenuItem; 22 struct ContextMenuItem;
21 23
22 } // namespace web_view_internal 24 } // namespace web_view_internal
23 } // namespace api 25 } // namespace api
24 26
25 // A delegate class of WebViewGuest that are not a part of chrome. 27 // A delegate class of WebViewGuest that are not a part of chrome.
26 class WebViewGuestDelegate { 28 class WebViewGuestDelegate {
27 public : 29 public :
28 WebViewGuestDelegate(); 30 WebViewGuestDelegate(WebViewGuest* web_view_guest);
Fady Samuel 2014/08/22 16:40:17 explicit
Xi Han 2014/08/22 18:04:52 Done.
29 virtual ~WebViewGuestDelegate(); 31 virtual ~WebViewGuestDelegate();
30 32
31 typedef std::vector<linked_ptr<api::web_view_internal::ContextMenuItem> > 33 typedef std::vector<linked_ptr<api::web_view_internal::ContextMenuItem> >
32 MenuItemVector; 34 MenuItemVector;
33 35
34 // Returns the current zoom factor. 36 // Returns the current zoom factor.
35 virtual double GetZoom() = 0; 37 virtual double GetZoom() = 0;
36 38
37 // Called when context menu operation was handled. 39 // Called when context menu operation was handled.
38 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0; 40 virtual bool HandleContextMenu(const content::ContextMenuParams& params) = 0;
(...skipping 17 matching lines...) Expand all
56 virtual void OnSetZoom(double zoom_factor) = 0; 58 virtual void OnSetZoom(double zoom_factor) = 0;
57 59
58 // Shows the context menu for the guest. 60 // Shows the context menu for the guest.
59 // |items| acts as a filter. This restricts the current context's default 61 // |items| acts as a filter. This restricts the current context's default
60 // menu items to contain only the items from |items|. 62 // menu items to contain only the items from |items|.
61 // |items| == NULL means no filtering will be applied. 63 // |items| == NULL means no filtering will be applied.
62 virtual void OnShowContextMenu( 64 virtual void OnShowContextMenu(
63 int request_id, 65 int request_id,
64 const MenuItemVector* items) = 0; 66 const MenuItemVector* items) = 0;
65 67
68 WebViewGuest* web_view_guest() const { return web_view_guest_; }
69
66 private: 70 private:
71 WebViewGuest* web_view_guest_;
72
67 DISALLOW_COPY_AND_ASSIGN(WebViewGuestDelegate); 73 DISALLOW_COPY_AND_ASSIGN(WebViewGuestDelegate);
68 }; 74 };
69 75
70 } // namespace extensions 76 } // namespace extensions
71 77
72 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_ 78 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698