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_oopif.h" | 5 #include "components/html_viewer/html_document_oopif.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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 view->viewport_metrics().size_in_pixels.To<gfx::Size>(), | 128 view->viewport_metrics().size_in_pixels.To<gfx::Size>(), |
129 view->viewport_metrics().device_pixel_ratio); | 129 view->viewport_metrics().device_pixel_ratio); |
130 | 130 |
131 view->RemoveObserver(this); | 131 view->RemoveObserver(this); |
132 | 132 |
133 WebURLRequestExtraData* extra_data = new WebURLRequestExtraData; | 133 WebURLRequestExtraData* extra_data = new WebURLRequestExtraData; |
134 extra_data->synthetic_response = | 134 extra_data->synthetic_response = |
135 resource_waiter_->ReleaseURLResponse().Pass(); | 135 resource_waiter_->ReleaseURLResponse().Pass(); |
136 | 136 |
137 frame_ = HTMLFrameTreeManager::CreateFrameAndAttachToTree( | 137 frame_ = HTMLFrameTreeManager::CreateFrameAndAttachToTree( |
138 global_state_, html_document_app_, view, resource_waiter_.Pass(), this); | 138 global_state_, view, resource_waiter_.Pass(), this); |
139 | 139 |
140 // TODO(yzshen): http://crbug.com/498986 Creating DevToolsAgentImpl instances | 140 // TODO(yzshen): http://crbug.com/498986 Creating DevToolsAgentImpl instances |
141 // causes html_viewer_apptests flakiness currently. Before we fix that we | 141 // causes html_viewer_apptests flakiness currently. Before we fix that we |
142 // cannot enable remote debugging (which is required by Telemetry tests) on | 142 // cannot enable remote debugging (which is required by Telemetry tests) on |
143 // the bots. | 143 // the bots. |
144 if (EnableRemoteDebugging() && !frame_->parent()) { | 144 if (EnableRemoteDebugging() && !frame_->parent()) { |
145 devtools_agent_.reset(new DevToolsAgentImpl( | 145 devtools_agent_.reset(new DevToolsAgentImpl( |
146 frame_->web_frame()->toWebLocalFrame(), html_document_app_->shell())); | 146 frame_->web_frame()->toWebLocalFrame(), html_document_app_->shell())); |
147 } | 147 } |
148 | 148 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 mojo::ApplicationConnection* connection, | 252 mojo::ApplicationConnection* connection, |
253 mojo::InterfaceRequest<mandoline::FrameTreeClient> request) { | 253 mojo::InterfaceRequest<mandoline::FrameTreeClient> request) { |
254 if (frame_) { | 254 if (frame_) { |
255 DVLOG(1) << "Request for FrameTreeClient after one already vended."; | 255 DVLOG(1) << "Request for FrameTreeClient after one already vended."; |
256 return; | 256 return; |
257 } | 257 } |
258 resource_waiter_->Bind(request.Pass()); | 258 resource_waiter_->Bind(request.Pass()); |
259 } | 259 } |
260 | 260 |
261 } // namespace html_viewer | 261 } // namespace html_viewer |
OLD | NEW |