OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_FRAMELET_RENDERER_FRAMELET_CONTAINER_H_ | 5 #ifndef COMPONENTS_FRAMELET_RENDERER_FRAMELET_CONTAINER_H_ |
6 #define COMPONENTS_FRAMELET_RENDERER_FRAMELET_CONTAINER_H_ | 6 #define COMPONENTS_FRAMELET_RENDERER_FRAMELET_CONTAINER_H_ |
7 | 7 |
8 #include "components/guest_view/renderer/guest_view_container.h" | 8 #include "components/guest_view/renderer/guest_view_container.h" |
9 | 9 |
| 10 #include "third_party/WebKit/public/platform/WebURLLoader.h" |
| 11 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" |
| 12 #include "ui/gfx/geometry/size.h" |
| 13 |
10 namespace guest_view { | 14 namespace guest_view { |
11 | 15 |
12 class FrameletContainer : public GuestViewContainer { | 16 class FrameletContainer : public GuestViewContainer { |
13 public: | 17 public: |
14 explicit FrameletContainer(content::RenderFrame* render_frame); | 18 explicit FrameletContainer(content::RenderFrame* render_frame); |
15 | 19 |
| 20 // GuestViewContainer implementation. |
| 21 bool OnMessage(const IPC::Message& message) override; |
| 22 |
| 23 // BrowserPluginDelegate implementation. |
| 24 void DidResizeElement(const gfx::Size& new_size) override; |
| 25 void DidFinishLoading() override; |
| 26 |
16 private: | 27 private: |
| 28 // Message handlers. |
| 29 void OnCreateFrameletGuestACK(int element_instance_id); |
| 30 void OnGuestAttached(int element_instance_id, |
| 31 int guest_proxy_routing_id); |
| 32 |
| 33 void CreateFrameletGuest(); |
| 34 |
| 35 // The RenderView routing ID of the guest. |
| 36 int guest_proxy_routing_id_; |
| 37 |
| 38 // The URL to navigate to. |
| 39 std::string url_; |
| 40 |
| 41 gfx::Size element_size_; |
| 42 |
| 43 bool is_embedded_; |
| 44 |
17 DISALLOW_COPY_AND_ASSIGN(FrameletContainer); | 45 DISALLOW_COPY_AND_ASSIGN(FrameletContainer); |
18 }; | 46 }; |
19 | 47 |
20 } // namespace guest_view | 48 } // namespace guest_view |
21 #endif // COMPONENTS_FRAMELET_RENDERER_FRAMELET_CONTAINER_H_ | 49 #endif // COMPONENTS_FRAMELET_RENDERER_FRAMELET_CONTAINER_H_ |
OLD | NEW |