| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 bool CanUseCrossProcessFrames() override; | 61 bool CanUseCrossProcessFrames() override; |
| 62 content::RenderFrameHost* GetEmbedderFrame() override; |
| 63 |
| 64 void SetEmbedderFrame(int process_id, int routing_id); |
| 62 | 65 |
| 63 protected: | 66 protected: |
| 64 explicit MimeHandlerViewGuest(content::WebContents* owner_web_contents); | 67 explicit MimeHandlerViewGuest(content::WebContents* owner_web_contents); |
| 65 ~MimeHandlerViewGuest() override; | 68 ~MimeHandlerViewGuest() override; |
| 66 | 69 |
| 67 private: | 70 private: |
| 68 friend class TestMimeHandlerViewGuest; | 71 friend class TestMimeHandlerViewGuest; |
| 69 | 72 |
| 70 // GuestViewBase implementation. | 73 // GuestViewBase implementation. |
| 71 const char* GetAPINamespace() const final; | 74 const char* GetAPINamespace() const final; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 93 // content::WebContentsObserver implementation. | 96 // content::WebContentsObserver implementation. |
| 94 void DocumentOnLoadCompletedInMainFrame() final; | 97 void DocumentOnLoadCompletedInMainFrame() final; |
| 95 | 98 |
| 96 std::string view_id() const { return view_id_; } | 99 std::string view_id() const { return view_id_; } |
| 97 base::WeakPtr<StreamContainer> GetStream() const; | 100 base::WeakPtr<StreamContainer> GetStream() const; |
| 98 | 101 |
| 99 std::unique_ptr<MimeHandlerViewGuestDelegate> delegate_; | 102 std::unique_ptr<MimeHandlerViewGuestDelegate> delegate_; |
| 100 std::unique_ptr<StreamContainer> stream_; | 103 std::unique_ptr<StreamContainer> stream_; |
| 101 std::string view_id_; | 104 std::string view_id_; |
| 102 | 105 |
| 106 int embedder_frame_process_id_; |
| 107 int embedder_frame_routing_id_; |
| 108 |
| 103 DISALLOW_COPY_AND_ASSIGN(MimeHandlerViewGuest); | 109 DISALLOW_COPY_AND_ASSIGN(MimeHandlerViewGuest); |
| 104 }; | 110 }; |
| 105 | 111 |
| 106 } // namespace extensions | 112 } // namespace extensions |
| 107 | 113 |
| 108 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUE
ST_H_ | 114 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUE
ST_H_ |
| OLD | NEW |