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 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_
H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_
H_ |
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_
H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_
H_ |
7 | 7 |
8 #include "extensions/browser/extension_function_dispatcher.h" | 8 #include "extensions/browser/extension_function_dispatcher.h" |
9 #include "extensions/browser/guest_view/guest_view.h" | 9 #include "extensions/browser/guest_view/guest_view.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 class WebContents; | 12 class WebContents; |
| 13 struct ContextMenuParams; |
13 } // namespace content | 14 } // namespace content |
14 | 15 |
15 namespace extensions { | 16 namespace extensions { |
16 | 17 |
17 class MimeHandlerViewGuestDelegate; | 18 class MimeHandlerViewGuestDelegate; |
18 | 19 |
19 class MimeHandlerViewGuest : public GuestView<MimeHandlerViewGuest>, | 20 class MimeHandlerViewGuest : public GuestView<MimeHandlerViewGuest>, |
20 public ExtensionFunctionDispatcher::Delegate { | 21 public ExtensionFunctionDispatcher::Delegate { |
21 public: | 22 public: |
22 static GuestViewBase* Create(content::BrowserContext* browser_context, | 23 static GuestViewBase* Create(content::BrowserContext* browser_context, |
(...skipping 17 matching lines...) Expand all Loading... |
40 void DidInitialize() override; | 41 void DidInitialize() override; |
41 | 42 |
42 // content::BrowserPluginGuestDelegate implementation | 43 // content::BrowserPluginGuestDelegate implementation |
43 bool Find(int request_id, | 44 bool Find(int request_id, |
44 const base::string16& search_text, | 45 const base::string16& search_text, |
45 const blink::WebFindOptions& options, | 46 const blink::WebFindOptions& options, |
46 bool is_full_page_plugin) override; | 47 bool is_full_page_plugin) override; |
47 | 48 |
48 // WebContentsDelegate implementation. | 49 // WebContentsDelegate implementation. |
49 void ContentsZoomChange(bool zoom_in) override; | 50 void ContentsZoomChange(bool zoom_in) override; |
| 51 bool HandleContextMenu(const content::ContextMenuParams& params) override; |
50 void HandleKeyboardEvent( | 52 void HandleKeyboardEvent( |
51 content::WebContents* source, | 53 content::WebContents* source, |
52 const content::NativeWebKeyboardEvent& event) override; | 54 const content::NativeWebKeyboardEvent& event) override; |
53 void FindReply(content::WebContents* web_contents, | 55 void FindReply(content::WebContents* web_contents, |
54 int request_id, | 56 int request_id, |
55 int number_of_matches, | 57 int number_of_matches, |
56 const gfx::Rect& selection_rect, | 58 const gfx::Rect& selection_rect, |
57 int active_match_ordinal, | 59 int active_match_ordinal, |
58 bool final_update) override; | 60 bool final_update) override; |
59 | 61 |
60 // content::WebContentsObserver implementation. | 62 // content::WebContentsObserver implementation. |
61 bool OnMessageReceived(const IPC::Message& message) override; | 63 bool OnMessageReceived(const IPC::Message& message) override; |
62 | 64 |
63 private: | 65 private: |
64 MimeHandlerViewGuest(content::BrowserContext* browser_context, | 66 MimeHandlerViewGuest(content::BrowserContext* browser_context, |
65 int guest_instance_id); | 67 int guest_instance_id); |
66 ~MimeHandlerViewGuest() override; | 68 ~MimeHandlerViewGuest() override; |
67 | 69 |
68 void OnRequest(const ExtensionHostMsg_Request_Params& params); | 70 void OnRequest(const ExtensionHostMsg_Request_Params& params); |
69 | 71 |
70 scoped_ptr<MimeHandlerViewGuestDelegate> delegate_; | 72 scoped_ptr<MimeHandlerViewGuestDelegate> delegate_; |
71 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_; | 73 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_; |
72 | 74 |
73 DISALLOW_COPY_AND_ASSIGN(MimeHandlerViewGuest); | 75 DISALLOW_COPY_AND_ASSIGN(MimeHandlerViewGuest); |
74 }; | 76 }; |
75 | 77 |
76 } // namespace extensions | 78 } // namespace extensions |
77 | 79 |
78 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUE
ST_H_ | 80 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUE
ST_H_ |
OLD | NEW |