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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "content/public/renderer/browser_plugin_delegate.h" | 10 #include "content/public/renderer/browser_plugin_delegate.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 static GuestViewContainer* FromID(int render_view_routing_id, | 23 static GuestViewContainer* FromID(int render_view_routing_id, |
24 int element_instance_id); | 24 int element_instance_id); |
25 | 25 |
26 void AttachGuest(int element_instance_id, | 26 void AttachGuest(int element_instance_id, |
27 int guest_instance_id, | 27 int guest_instance_id, |
28 scoped_ptr<base::DictionaryValue> params, | 28 scoped_ptr<base::DictionaryValue> params, |
29 v8::Handle<v8::Function> callback, | 29 v8::Handle<v8::Function> callback, |
30 v8::Isolate* isolate); | 30 v8::Isolate* isolate); |
31 | 31 |
32 // BrowserPluginDelegate implementation. | 32 // BrowserPluginDelegate implementation. |
33 virtual void SetElementInstanceID(int element_instance_id) OVERRIDE; | 33 virtual void SetElementInstanceID(int element_instance_id) override; |
34 virtual void DidFinishLoading() OVERRIDE; | 34 virtual void DidFinishLoading() override; |
35 virtual void DidReceiveData(const char* data, int data_length) OVERRIDE; | 35 virtual void DidReceiveData(const char* data, int data_length) override; |
36 | 36 |
37 // RenderFrameObserver override. | 37 // RenderFrameObserver override. |
38 virtual void OnDestruct() OVERRIDE; | 38 virtual void OnDestruct() override; |
39 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 39 virtual bool OnMessageReceived(const IPC::Message& message) override; |
40 | 40 |
41 private: | 41 private: |
42 void OnCreateMimeHandlerViewGuestACK(int element_instance_id); | 42 void OnCreateMimeHandlerViewGuestACK(int element_instance_id); |
43 void OnGuestAttached(int element_instance_id, int guest_routing_id); | 43 void OnGuestAttached(int element_instance_id, int guest_routing_id); |
44 | 44 |
45 static bool ShouldHandleMessage(const IPC::Message& mesage); | 45 static bool ShouldHandleMessage(const IPC::Message& mesage); |
46 | 46 |
47 const std::string mime_type_; | 47 const std::string mime_type_; |
48 int element_instance_id_; | 48 int element_instance_id_; |
49 std::string html_string_; | 49 std::string html_string_; |
50 // Save the RenderView RoutingID here so that we can use it during | 50 // Save the RenderView RoutingID here so that we can use it during |
51 // destruction. | 51 // destruction. |
52 int render_view_routing_id_; | 52 int render_view_routing_id_; |
53 | 53 |
54 bool attached_; | 54 bool attached_; |
55 bool attach_pending_; | 55 bool attach_pending_; |
56 | 56 |
57 ScopedPersistent<v8::Function> callback_; | 57 ScopedPersistent<v8::Function> callback_; |
58 v8::Isolate* isolate_; | 58 v8::Isolate* isolate_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(GuestViewContainer); | 60 DISALLOW_COPY_AND_ASSIGN(GuestViewContainer); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace extensions | 63 } // namespace extensions |
64 | 64 |
65 #endif // CHROME_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ | 65 #endif // CHROME_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ |
OLD | NEW |