Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Side by Side Diff: components/html_viewer/document_resource_waiter.cc

Issue 1340983002: Mandoline UI Process: Update namespaces and file names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/view.h" 10 #include "components/mus/public/cpp/view.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 *change_id = change_id_; 51 *change_id = change_id_;
52 *view_id = view_id_; 52 *view_id = view_id_;
53 *view_connect_type = view_connect_type_; 53 *view_connect_type = view_connect_type_;
54 *on_connect_callback = on_connect_callback_; 54 *on_connect_callback = on_connect_callback_;
55 } 55 }
56 56
57 mojo::URLResponsePtr DocumentResourceWaiter::ReleaseURLResponse() { 57 mojo::URLResponsePtr DocumentResourceWaiter::ReleaseURLResponse() {
58 return response_.Pass(); 58 return response_.Pass();
59 } 59 }
60 60
61 void DocumentResourceWaiter::SetRoot(mojo::View* root) { 61 void DocumentResourceWaiter::SetRoot(mus::View* root) {
62 DCHECK(!root_); 62 DCHECK(!root_);
63 root_ = root; 63 root_ = root;
64 root_->AddObserver(this); 64 root_->AddObserver(this);
65 UpdateIsReady(); 65 UpdateIsReady();
66 } 66 }
67 67
68 void DocumentResourceWaiter::Bind( 68 void DocumentResourceWaiter::Bind(
69 mojo::InterfaceRequest<web_view::FrameTreeClient> request) { 69 mojo::InterfaceRequest<web_view::FrameTreeClient> request) {
70 if (frame_tree_client_binding_.is_bound() || !frame_data_.is_null()) { 70 if (frame_tree_client_binding_.is_bound() || !frame_data_.is_null()) {
71 DVLOG(1) << "Request for FrameTreeClient after already supplied one"; 71 DVLOG(1) << "Request for FrameTreeClient after already supplied one";
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // It is assumed we receive OnConnect() (which unbinds) before anything else. 166 // It is assumed we receive OnConnect() (which unbinds) before anything else.
167 NOTREACHED(); 167 NOTREACHED();
168 } 168 }
169 169
170 void DocumentResourceWaiter::OnWillNavigate(uint32_t target_frame_id) { 170 void DocumentResourceWaiter::OnWillNavigate(uint32_t target_frame_id) {
171 // It is assumed we receive OnConnect() (which unbinds) before anything else. 171 // It is assumed we receive OnConnect() (which unbinds) before anything else.
172 NOTIMPLEMENTED(); 172 NOTIMPLEMENTED();
173 } 173 }
174 174
175 void DocumentResourceWaiter::OnViewViewportMetricsChanged( 175 void DocumentResourceWaiter::OnViewViewportMetricsChanged(
176 mojo::View* view, 176 mus::View* view,
177 const mojo::ViewportMetrics& old_metrics, 177 const mojo::ViewportMetrics& old_metrics,
178 const mojo::ViewportMetrics& new_metrics) { 178 const mojo::ViewportMetrics& new_metrics) {
179 UpdateIsReady(); 179 UpdateIsReady();
180 } 180 }
181 181
182 void DocumentResourceWaiter::OnViewDestroyed(mojo::View* view) { 182 void DocumentResourceWaiter::OnViewDestroyed(mus::View* view) {
183 root_->RemoveObserver(this); 183 root_->RemoveObserver(this);
184 root_ = nullptr; 184 root_ = nullptr;
185 } 185 }
186 186
187 void DocumentResourceWaiter::OnHTMLFrameTreeManagerChangeIdAdvanced() { 187 void DocumentResourceWaiter::OnHTMLFrameTreeManagerChangeIdAdvanced() {
188 UpdateIsReady(); 188 UpdateIsReady();
189 } 189 }
190 190
191 void DocumentResourceWaiter::OnHTMLFrameTreeManagerDestroyed() { 191 void DocumentResourceWaiter::OnHTMLFrameTreeManagerDestroyed() {
192 document_->Destroy(); // This destroys us. 192 document_->Destroy(); // This destroys us.
193 } 193 }
194 194
195 } // namespace html_viewer 195 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/html_viewer/document_resource_waiter.h ('k') | components/html_viewer/global_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698