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 COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_OOPIF_H_ | 5 #ifndef COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_OOPIF_H_ |
6 #define COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_OOPIF_H_ | 6 #define COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_OOPIF_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // . When the View the HTMLDocument is embedded in is destroyed. | 48 // . When the View the HTMLDocument is embedded in is destroyed. |
49 // . Explicitly by way of Destroy(). | 49 // . Explicitly by way of Destroy(). |
50 class HTMLDocumentOOPIF | 50 class HTMLDocumentOOPIF |
51 : public mojo::ViewManagerDelegate, | 51 : public mojo::ViewManagerDelegate, |
52 public mojo::ViewObserver, | 52 public mojo::ViewObserver, |
53 public HTMLFrameDelegate, | 53 public HTMLFrameDelegate, |
54 public mojo::InterfaceFactory<mojo::AxProvider>, | 54 public mojo::InterfaceFactory<mojo::AxProvider>, |
55 public mojo::InterfaceFactory<mandoline::FrameTreeClient>, | 55 public mojo::InterfaceFactory<mandoline::FrameTreeClient>, |
56 public mojo::InterfaceFactory<TestHTMLViewer>, | 56 public mojo::InterfaceFactory<TestHTMLViewer>, |
57 public mojo::InterfaceFactory<devtools_service::DevToolsAgent>, | 57 public mojo::InterfaceFactory<devtools_service::DevToolsAgent>, |
58 public mojo::InterfaceFactory<mojo::ViewManagerClient> { | 58 public mojo::InterfaceFactory<mojo::ViewTreeClient> { |
59 public: | 59 public: |
60 using DeleteCallback = base::Callback<void(HTMLDocumentOOPIF*)>; | 60 using DeleteCallback = base::Callback<void(HTMLDocumentOOPIF*)>; |
61 using HTMLFrameCreationCallback = | 61 using HTMLFrameCreationCallback = |
62 base::Callback<HTMLFrame*(HTMLFrame::CreateParams*)>; | 62 base::Callback<HTMLFrame*(HTMLFrame::CreateParams*)>; |
63 | 63 |
64 // Load a new HTMLDocument with |response|. | 64 // Load a new HTMLDocument with |response|. |
65 // |html_document_app| is the application this app was created in, and | 65 // |html_document_app| is the application this app was created in, and |
66 // |connection| the specific connection triggering this new instance. | 66 // |connection| the specific connection triggering this new instance. |
67 // |setup| is used to obtain init type state (such as resources). | 67 // |setup| is used to obtain init type state (such as resources). |
68 HTMLDocumentOOPIF(mojo::ApplicationImpl* html_document_app, | 68 HTMLDocumentOOPIF(mojo::ApplicationImpl* html_document_app, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 // mojo::InterfaceFactory<TestHTMLViewer>: | 124 // mojo::InterfaceFactory<TestHTMLViewer>: |
125 void Create(mojo::ApplicationConnection* connection, | 125 void Create(mojo::ApplicationConnection* connection, |
126 mojo::InterfaceRequest<TestHTMLViewer> request) override; | 126 mojo::InterfaceRequest<TestHTMLViewer> request) override; |
127 | 127 |
128 // mojo::InterfaceFactory<devtools_service::DevToolsAgent>: | 128 // mojo::InterfaceFactory<devtools_service::DevToolsAgent>: |
129 void Create( | 129 void Create( |
130 mojo::ApplicationConnection* connection, | 130 mojo::ApplicationConnection* connection, |
131 mojo::InterfaceRequest<devtools_service::DevToolsAgent> request) override; | 131 mojo::InterfaceRequest<devtools_service::DevToolsAgent> request) override; |
132 | 132 |
133 // mojo::InterfaceFactory<mojo::ViewManagerClient>: | 133 // mojo::InterfaceFactory<mojo::ViewTreeClient>: |
134 void Create(mojo::ApplicationConnection* connection, | 134 void Create(mojo::ApplicationConnection* connection, |
135 mojo::InterfaceRequest<mojo::ViewManagerClient> request) override; | 135 mojo::InterfaceRequest<mojo::ViewTreeClient> request) override; |
136 | 136 |
137 scoped_ptr<mojo::AppRefCount> app_refcount_; | 137 scoped_ptr<mojo::AppRefCount> app_refcount_; |
138 mojo::ApplicationImpl* html_document_app_; | 138 mojo::ApplicationImpl* html_document_app_; |
139 mojo::ApplicationConnection* connection_; | 139 mojo::ApplicationConnection* connection_; |
140 | 140 |
141 // HTMLDocument owns these pointers; binding requests after document load. | 141 // HTMLDocument owns these pointers; binding requests after document load. |
142 std::set<AxProviderImpl*> ax_providers_; | 142 std::set<AxProviderImpl*> ax_providers_; |
143 | 143 |
144 ScopedVector<TestHTMLViewerImpl> test_html_viewers_; | 144 ScopedVector<TestHTMLViewerImpl> test_html_viewers_; |
145 | 145 |
(...skipping 18 matching lines...) Expand all Loading... |
164 // initialized. | 164 // initialized. |
165 mojo::InterfaceRequest<devtools_service::DevToolsAgent> | 165 mojo::InterfaceRequest<devtools_service::DevToolsAgent> |
166 devtools_agent_request_; | 166 devtools_agent_request_; |
167 | 167 |
168 DISALLOW_COPY_AND_ASSIGN(HTMLDocumentOOPIF); | 168 DISALLOW_COPY_AND_ASSIGN(HTMLDocumentOOPIF); |
169 }; | 169 }; |
170 | 170 |
171 } // namespace html_viewer | 171 } // namespace html_viewer |
172 | 172 |
173 #endif // COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_OOPIF_H_ | 173 #endif // COMPONENTS_HTML_VIEWER_HTML_DOCUMENT_OOPIF_H_ |
OLD | NEW |