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 #include "components/html_viewer/html_document.h" | 5 #include "components/html_viewer/html_document.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 GlobalState* global_state, | 99 GlobalState* global_state, |
100 const DeleteCallback& delete_callback, | 100 const DeleteCallback& delete_callback, |
101 HTMLFactory* factory) | 101 HTMLFactory* factory) |
102 : app_refcount_(html_document_shell->CreateAppRefCount()), | 102 : app_refcount_(html_document_shell->CreateAppRefCount()), |
103 html_document_shell_(html_document_shell), | 103 html_document_shell_(html_document_shell), |
104 connection_(connection), | 104 connection_(connection), |
105 global_state_(global_state), | 105 global_state_(global_state), |
106 frame_(nullptr), | 106 frame_(nullptr), |
107 delete_callback_(delete_callback), | 107 delete_callback_(delete_callback), |
108 factory_(factory) { | 108 factory_(factory) { |
109 connection->AddService<web_view::mojom::FrameClient>(this); | 109 connection->AddInterface<web_view::mojom::FrameClient>(this); |
110 connection->AddService<AxProvider>(this); | 110 connection->AddInterface<AxProvider>(this); |
111 connection->AddService<mus::mojom::WindowTreeClient>(this); | 111 connection->AddInterface<mus::mojom::WindowTreeClient>(this); |
112 connection->AddService<devtools_service::DevToolsAgent>(this); | 112 connection->AddInterface<devtools_service::DevToolsAgent>(this); |
113 if (IsTestInterfaceEnabled()) | 113 if (IsTestInterfaceEnabled()) |
114 connection->AddService<TestHTMLViewer>(this); | 114 connection->AddInterface<TestHTMLViewer>(this); |
115 | 115 |
116 resource_waiter_.reset( | 116 resource_waiter_.reset( |
117 new DocumentResourceWaiter(global_state_, std::move(response), this)); | 117 new DocumentResourceWaiter(global_state_, std::move(response), this)); |
118 } | 118 } |
119 | 119 |
120 void HTMLDocument::Destroy() { | 120 void HTMLDocument::Destroy() { |
121 TRACE_EVENT0("html_viewer", "HTMLDocument::Destroy"); | 121 TRACE_EVENT0("html_viewer", "HTMLDocument::Destroy"); |
122 if (resource_waiter_) { | 122 if (resource_waiter_) { |
123 mus::Window* root = resource_waiter_->root(); | 123 mus::Window* root = resource_waiter_->root(); |
124 if (root) { | 124 if (root) { |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 DCHECK(!transferable_state_.window_tree_delegate_impl); | 323 DCHECK(!transferable_state_.window_tree_delegate_impl); |
324 transferable_state_.window_tree_delegate_impl.reset( | 324 transferable_state_.window_tree_delegate_impl.reset( |
325 new WindowTreeDelegateImpl(this)); | 325 new WindowTreeDelegateImpl(this)); |
326 transferable_state_.owns_window_tree_connection = true; | 326 transferable_state_.owns_window_tree_connection = true; |
327 mus::WindowTreeConnection::Create( | 327 mus::WindowTreeConnection::Create( |
328 transferable_state_.window_tree_delegate_impl.get(), std::move(request), | 328 transferable_state_.window_tree_delegate_impl.get(), std::move(request), |
329 mus::WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED); | 329 mus::WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED); |
330 } | 330 } |
331 | 331 |
332 } // namespace html_viewer | 332 } // namespace html_viewer |
OLD | NEW |