| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 | 180 |
| 181 const GURL url(extra_data->synthetic_response->url); | 181 const GURL url(extra_data->synthetic_response->url); |
| 182 | 182 |
| 183 blink::WebURLRequest web_request; | 183 blink::WebURLRequest web_request; |
| 184 web_request.initialize(); | 184 web_request.initialize(); |
| 185 web_request.setURL(url); | 185 web_request.setURL(url); |
| 186 web_request.setExtraData(extra_data.release()); | 186 web_request.setExtraData(extra_data.release()); |
| 187 | 187 |
| 188 frame_->web_frame()->toWebLocalFrame()->loadRequest(web_request); | 188 frame_->LoadRequest(web_request); |
| 189 } | 189 } |
| 190 | 190 |
| 191 HTMLDocument::BeforeLoadCache* HTMLDocument::GetBeforeLoadCache() { | 191 HTMLDocument::BeforeLoadCache* HTMLDocument::GetBeforeLoadCache() { |
| 192 CHECK(!did_finish_local_frame_load_); | 192 CHECK(!did_finish_local_frame_load_); |
| 193 if (!before_load_cache_.get()) | 193 if (!before_load_cache_.get()) |
| 194 before_load_cache_.reset(new BeforeLoadCache); | 194 before_load_cache_.reset(new BeforeLoadCache); |
| 195 return before_load_cache_.get(); | 195 return before_load_cache_.get(); |
| 196 } | 196 } |
| 197 | 197 |
| 198 void HTMLDocument::OnEmbed(View* root) { | 198 void HTMLDocument::OnEmbed(View* root) { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 mojo::InterfaceRequest<mojo::ViewTreeClient> request) { | 314 mojo::InterfaceRequest<mojo::ViewTreeClient> request) { |
| 315 DCHECK(!transferable_state_.view_tree_delegate_impl); | 315 DCHECK(!transferable_state_.view_tree_delegate_impl); |
| 316 transferable_state_.view_tree_delegate_impl.reset( | 316 transferable_state_.view_tree_delegate_impl.reset( |
| 317 new ViewTreeDelegateImpl(this)); | 317 new ViewTreeDelegateImpl(this)); |
| 318 transferable_state_.owns_view_tree_connection = true; | 318 transferable_state_.owns_view_tree_connection = true; |
| 319 mus::ViewTreeConnection::Create( | 319 mus::ViewTreeConnection::Create( |
| 320 transferable_state_.view_tree_delegate_impl.get(), request.Pass()); | 320 transferable_state_.view_tree_delegate_impl.get(), request.Pass()); |
| 321 } | 321 } |
| 322 | 322 |
| 323 } // namespace html_viewer | 323 } // namespace html_viewer |
| OLD | NEW |