| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/document_resource_waiter.h" | 5 #include "components/html_viewer/document_resource_waiter.h" |
| 6 | 6 |
| 7 #include "components/html_viewer/global_state.h" | 7 #include "components/html_viewer/global_state.h" |
| 8 #include "components/html_viewer/html_document.h" | 8 #include "components/html_viewer/html_document.h" |
| 9 #include "components/html_viewer/html_frame_tree_manager.h" | 9 #include "components/html_viewer/html_frame_tree_manager.h" |
| 10 #include "components/mus/public/cpp/window.h" | 10 #include "components/mus/public/cpp/window.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 NOTREACHED(); | 212 NOTREACHED(); |
| 213 } | 213 } |
| 214 | 214 |
| 215 void DocumentResourceWaiter::StopHighlightingFindResults() { | 215 void DocumentResourceWaiter::StopHighlightingFindResults() { |
| 216 // It is assumed we receive OnConnect() (which unbinds) before anything else. | 216 // It is assumed we receive OnConnect() (which unbinds) before anything else. |
| 217 NOTREACHED(); | 217 NOTREACHED(); |
| 218 } | 218 } |
| 219 | 219 |
| 220 void DocumentResourceWaiter::OnWindowViewportMetricsChanged( | 220 void DocumentResourceWaiter::OnWindowViewportMetricsChanged( |
| 221 mus::Window* window, | 221 mus::Window* window, |
| 222 const mojo::ViewportMetrics& old_metrics, | 222 const mus::mojom::ViewportMetrics& old_metrics, |
| 223 const mojo::ViewportMetrics& new_metrics) { | 223 const mus::mojom::ViewportMetrics& new_metrics) { |
| 224 UpdateIsReady(); | 224 UpdateIsReady(); |
| 225 } | 225 } |
| 226 | 226 |
| 227 void DocumentResourceWaiter::OnWindowDestroyed(mus::Window* window) { | 227 void DocumentResourceWaiter::OnWindowDestroyed(mus::Window* window) { |
| 228 root_->RemoveObserver(this); | 228 root_->RemoveObserver(this); |
| 229 root_ = nullptr; | 229 root_ = nullptr; |
| 230 } | 230 } |
| 231 | 231 |
| 232 void DocumentResourceWaiter::OnHTMLFrameTreeManagerChangeIdAdvanced() { | 232 void DocumentResourceWaiter::OnHTMLFrameTreeManagerChangeIdAdvanced() { |
| 233 UpdateIsReady(); | 233 UpdateIsReady(); |
| 234 } | 234 } |
| 235 | 235 |
| 236 void DocumentResourceWaiter::OnHTMLFrameTreeManagerDestroyed() { | 236 void DocumentResourceWaiter::OnHTMLFrameTreeManagerDestroyed() { |
| 237 document_->Destroy(); // This destroys us. | 237 document_->Destroy(); // This destroys us. |
| 238 } | 238 } |
| 239 | 239 |
| 240 } // namespace html_viewer | 240 } // namespace html_viewer |
| OLD | NEW |