Chromium Code Reviews| 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 COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ | 5 #ifndef COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ |
| 6 #define COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ | 6 #define COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <queue> | 9 #include <queue> |
| 10 | 10 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 193 // This value is only valid after attachment or first navigation. | 193 // This value is only valid after attachment or first navigation. |
| 194 int proxy_routing_id() const { return guest_proxy_routing_id_; } | 194 int proxy_routing_id() const { return guest_proxy_routing_id_; } |
| 195 | 195 |
| 196 // Destroy this guest. | 196 // Destroy this guest. |
| 197 void Destroy(); | 197 void Destroy(); |
| 198 | 198 |
| 199 // Saves the attach state of the custom element hosting this GuestView. | 199 // Saves the attach state of the custom element hosting this GuestView. |
| 200 void SetAttachParams(const base::DictionaryValue& params); | 200 void SetAttachParams(const base::DictionaryValue& params); |
| 201 void SetOpener(GuestViewBase* opener); | 201 void SetOpener(GuestViewBase* opener); |
| 202 | 202 |
| 203 // BrowserPluginGuestDelegate implementation. | |
| 204 content::RenderWidgetHost* GetOwnerRenderWidgetHost() override; | |
| 205 content::SiteInstance* GetOwnerSiteInstance() override; | |
| 206 | |
| 203 protected: | 207 protected: |
| 204 explicit GuestViewBase(content::WebContents* owner_web_contents); | 208 explicit GuestViewBase(content::WebContents* owner_web_contents); |
| 205 | 209 |
| 206 ~GuestViewBase() override; | 210 ~GuestViewBase() override; |
| 207 | 211 |
| 208 // BrowserPluginGuestDelegate implementation. | 212 // BrowserPluginGuestDelegate implementation. |
| 209 void SetContextMenuPosition(const gfx::Point& position) override; | 213 void SetContextMenuPosition(const gfx::Point& position) override; |
| 210 | 214 |
| 215 // TODO(ekaramad): If a guest is based on BrowserPlugin and is embedded inside | |
| 216 // a cross-process frame, we need to notify the destruction of the frame so | |
| 217 // that the clean-up on the browser side is done appropriately. Remove this | |
| 218 // methdo when BrowserPlugin is removed (https://crbug.com/535197). | |
|
Charlie Reis
2016/11/16 22:25:27
nit: method
EhsanK
2016/11/16 22:47:49
Done.
| |
| 219 virtual void OnRenderFrameHostDeleted(int process_id, int routing_id); | |
| 220 | |
| 211 // WebContentsDelegate implementation. | 221 // WebContentsDelegate implementation. |
| 212 void HandleKeyboardEvent( | 222 void HandleKeyboardEvent( |
| 213 content::WebContents* source, | 223 content::WebContents* source, |
| 214 const content::NativeWebKeyboardEvent& event) override; | 224 const content::NativeWebKeyboardEvent& event) override; |
| 215 bool PreHandleGestureEvent(content::WebContents* source, | 225 bool PreHandleGestureEvent(content::WebContents* source, |
| 216 const blink::WebGestureEvent& event) override; | 226 const blink::WebGestureEvent& event) override; |
| 217 void FindReply(content::WebContents* source, | 227 void FindReply(content::WebContents* source, |
| 218 int request_id, | 228 int request_id, |
| 219 int number_of_matches, | 229 int number_of_matches, |
| 220 const gfx::Rect& selection_rect, | 230 const gfx::Rect& selection_rect, |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 479 // This is used to ensure pending tasks will not fire after this object is | 489 // This is used to ensure pending tasks will not fire after this object is |
| 480 // destroyed. | 490 // destroyed. |
| 481 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; | 491 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; |
| 482 | 492 |
| 483 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); | 493 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); |
| 484 }; | 494 }; |
| 485 | 495 |
| 486 } // namespace guest_view | 496 } // namespace guest_view |
| 487 | 497 |
| 488 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ | 498 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ |
| OLD | NEW |