| 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 CHROME_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ | 5 #ifndef CHROME_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ |
| 6 #define CHROME_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ | 6 #define CHROME_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 private: | 49 private: |
| 50 const int element_instance_id_; | 50 const int element_instance_id_; |
| 51 const int guest_instance_id_; | 51 const int guest_instance_id_; |
| 52 scoped_ptr<base::DictionaryValue> params_; | 52 scoped_ptr<base::DictionaryValue> params_; |
| 53 ScopedPersistent<v8::Function> callback_; | 53 ScopedPersistent<v8::Function> callback_; |
| 54 v8::Isolate* const isolate_; | 54 v8::Isolate* const isolate_; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 GuestViewContainer(content::RenderFrame* render_frame, | 57 GuestViewContainer(content::RenderFrame* render_frame, |
| 58 const std::string& mime_type); | 58 const std::string& mime_type); |
| 59 virtual ~GuestViewContainer(); | 59 ~GuestViewContainer() override; |
| 60 | 60 |
| 61 static GuestViewContainer* FromID(int render_view_routing_id, | 61 static GuestViewContainer* FromID(int render_view_routing_id, |
| 62 int element_instance_id); | 62 int element_instance_id); |
| 63 | 63 |
| 64 void AttachGuest(linked_ptr<AttachRequest> request); | 64 void AttachGuest(linked_ptr<AttachRequest> request); |
| 65 | 65 |
| 66 // BrowserPluginDelegate implementation. | 66 // BrowserPluginDelegate implementation. |
| 67 virtual void SetElementInstanceID(int element_instance_id) override; | 67 void SetElementInstanceID(int element_instance_id) override; |
| 68 virtual void DidFinishLoading() override; | 68 void DidFinishLoading() override; |
| 69 virtual void DidReceiveData(const char* data, int data_length) override; | 69 void DidReceiveData(const char* data, int data_length) override; |
| 70 virtual void Ready() override; | 70 void Ready() override; |
| 71 | 71 |
| 72 // RenderFrameObserver override. | 72 // RenderFrameObserver override. |
| 73 virtual void OnDestruct() override; | 73 void OnDestruct() override; |
| 74 virtual bool OnMessageReceived(const IPC::Message& message) override; | 74 bool OnMessageReceived(const IPC::Message& message) override; |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 void OnCreateMimeHandlerViewGuestACK(int element_instance_id); | 77 void OnCreateMimeHandlerViewGuestACK(int element_instance_id); |
| 78 void OnGuestAttached(int element_instance_id, int guest_proxy_routing_id); | 78 void OnGuestAttached(int element_instance_id, int guest_proxy_routing_id); |
| 79 | 79 |
| 80 void AttachGuestInternal(linked_ptr<AttachRequest> request); | 80 void AttachGuestInternal(linked_ptr<AttachRequest> request); |
| 81 void EnqueueAttachRequest(linked_ptr<AttachRequest> request); | 81 void EnqueueAttachRequest(linked_ptr<AttachRequest> request); |
| 82 void PerformPendingAttachRequest(); | 82 void PerformPendingAttachRequest(); |
| 83 void HandlePendingResponseCallback(int guest_proxy_routing_id); | 83 void HandlePendingResponseCallback(int guest_proxy_routing_id); |
| 84 | 84 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 96 | 96 |
| 97 std::deque<linked_ptr<AttachRequest> > pending_requests_; | 97 std::deque<linked_ptr<AttachRequest> > pending_requests_; |
| 98 linked_ptr<AttachRequest> pending_response_; | 98 linked_ptr<AttachRequest> pending_response_; |
| 99 | 99 |
| 100 DISALLOW_COPY_AND_ASSIGN(GuestViewContainer); | 100 DISALLOW_COPY_AND_ASSIGN(GuestViewContainer); |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 } // namespace extensions | 103 } // namespace extensions |
| 104 | 104 |
| 105 #endif // CHROME_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ | 105 #endif // CHROME_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ |
| OLD | NEW |