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 "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "components/guest_view/browser/guest_view.h" | 10 #include "components/guest_view/browser/guest_view.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 }; | 51 }; |
52 | 52 |
53 class MimeHandlerViewGuest : | 53 class MimeHandlerViewGuest : |
54 public guest_view::GuestView<MimeHandlerViewGuest> { | 54 public guest_view::GuestView<MimeHandlerViewGuest> { |
55 public: | 55 public: |
56 static guest_view::GuestViewBase* Create( | 56 static guest_view::GuestViewBase* Create( |
57 content::WebContents* owner_web_contents); | 57 content::WebContents* owner_web_contents); |
58 | 58 |
59 static const char Type[]; | 59 static const char Type[]; |
60 | 60 |
| 61 // BrowserPluginGuestDelegate overrides. |
61 bool CanUseCrossProcessFrames() override; | 62 bool CanUseCrossProcessFrames() override; |
| 63 content::RenderFrameHost* GetOwnerFrame() override; |
| 64 bool CanBeEmbeddedInsideCrossProcessFrames() override; |
| 65 |
| 66 void SetEmbedderFrame(int process_id, int routing_id); |
62 | 67 |
63 protected: | 68 protected: |
64 explicit MimeHandlerViewGuest(content::WebContents* owner_web_contents); | 69 explicit MimeHandlerViewGuest(content::WebContents* owner_web_contents); |
65 ~MimeHandlerViewGuest() override; | 70 ~MimeHandlerViewGuest() override; |
66 | 71 |
67 private: | 72 private: |
68 friend class TestMimeHandlerViewGuest; | 73 friend class TestMimeHandlerViewGuest; |
69 | 74 |
70 // GuestViewBase implementation. | 75 // GuestViewBase implementation. |
71 const char* GetAPINamespace() const final; | 76 const char* GetAPINamespace() const final; |
(...skipping 21 matching lines...) Expand all Loading... |
93 // content::WebContentsObserver implementation. | 98 // content::WebContentsObserver implementation. |
94 void DocumentOnLoadCompletedInMainFrame() final; | 99 void DocumentOnLoadCompletedInMainFrame() final; |
95 | 100 |
96 std::string view_id() const { return view_id_; } | 101 std::string view_id() const { return view_id_; } |
97 base::WeakPtr<StreamContainer> GetStream() const; | 102 base::WeakPtr<StreamContainer> GetStream() const; |
98 | 103 |
99 std::unique_ptr<MimeHandlerViewGuestDelegate> delegate_; | 104 std::unique_ptr<MimeHandlerViewGuestDelegate> delegate_; |
100 std::unique_ptr<StreamContainer> stream_; | 105 std::unique_ptr<StreamContainer> stream_; |
101 std::string view_id_; | 106 std::string view_id_; |
102 | 107 |
| 108 int embedder_frame_process_id_; |
| 109 int embedder_frame_routing_id_; |
| 110 |
103 DISALLOW_COPY_AND_ASSIGN(MimeHandlerViewGuest); | 111 DISALLOW_COPY_AND_ASSIGN(MimeHandlerViewGuest); |
104 }; | 112 }; |
105 | 113 |
106 } // namespace extensions | 114 } // namespace extensions |
107 | 115 |
108 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUE
ST_H_ | 116 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUE
ST_H_ |
OLD | NEW |