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

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

Issue 1347023003: Rename frame classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 5 years, 2 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
« no previous file with comments | « components/html_viewer/html_document.h ('k') | components/html_viewer/html_frame.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 const DeleteCallback& delete_callback, 97 const DeleteCallback& delete_callback,
98 HTMLFactory* factory) 98 HTMLFactory* factory)
99 : app_refcount_(html_document_app->app_lifetime_helper() 99 : app_refcount_(html_document_app->app_lifetime_helper()
100 ->CreateAppRefCount()), 100 ->CreateAppRefCount()),
101 html_document_app_(html_document_app), 101 html_document_app_(html_document_app),
102 connection_(connection), 102 connection_(connection),
103 global_state_(global_state), 103 global_state_(global_state),
104 frame_(nullptr), 104 frame_(nullptr),
105 delete_callback_(delete_callback), 105 delete_callback_(delete_callback),
106 factory_(factory) { 106 factory_(factory) {
107 connection->AddService<web_view::FrameTreeClient>(this); 107 connection->AddService<web_view::mojom::FrameClient>(this);
108 connection->AddService<AxProvider>(this); 108 connection->AddService<AxProvider>(this);
109 connection->AddService<mojo::ViewTreeClient>(this); 109 connection->AddService<mojo::ViewTreeClient>(this);
110 connection->AddService<devtools_service::DevToolsAgent>(this); 110 connection->AddService<devtools_service::DevToolsAgent>(this);
111 if (IsTestInterfaceEnabled()) 111 if (IsTestInterfaceEnabled())
112 connection->AddService<TestHTMLViewer>(this); 112 connection->AddService<TestHTMLViewer>(this);
113 113
114 resource_waiter_.reset( 114 resource_waiter_.reset(
115 new DocumentResourceWaiter(global_state_, response.Pass(), this)); 115 new DocumentResourceWaiter(global_state_, response.Pass(), this));
116 } 116 }
117 117
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 *cached_request = request.Pass(); 283 *cached_request = request.Pass();
284 GetBeforeLoadCache()->test_interface_requests.insert(cached_request); 284 GetBeforeLoadCache()->test_interface_requests.insert(cached_request);
285 } else { 285 } else {
286 test_html_viewers_.push_back(new TestHTMLViewerImpl( 286 test_html_viewers_.push_back(new TestHTMLViewerImpl(
287 frame_->web_frame()->toWebLocalFrame(), request.Pass())); 287 frame_->web_frame()->toWebLocalFrame(), request.Pass()));
288 } 288 }
289 } 289 }
290 290
291 void HTMLDocument::Create( 291 void HTMLDocument::Create(
292 mojo::ApplicationConnection* connection, 292 mojo::ApplicationConnection* connection,
293 mojo::InterfaceRequest<web_view::FrameTreeClient> request) { 293 mojo::InterfaceRequest<web_view::mojom::FrameClient> request) {
294 if (frame_) { 294 if (frame_) {
295 DVLOG(1) << "Request for FrameTreeClient after one already vended."; 295 DVLOG(1) << "Request for FrameClient after one already vended.";
296 return; 296 return;
297 } 297 }
298 resource_waiter_->Bind(request.Pass()); 298 resource_waiter_->Bind(request.Pass());
299 } 299 }
300 300
301 void HTMLDocument::Create( 301 void HTMLDocument::Create(
302 mojo::ApplicationConnection* connection, 302 mojo::ApplicationConnection* connection,
303 mojo::InterfaceRequest<devtools_service::DevToolsAgent> request) { 303 mojo::InterfaceRequest<devtools_service::DevToolsAgent> request) {
304 if (frame_) { 304 if (frame_) {
305 if (frame_->devtools_agent()) 305 if (frame_->devtools_agent())
306 frame_->devtools_agent()->BindToRequest(request.Pass()); 306 frame_->devtools_agent()->BindToRequest(request.Pass());
307 } else { 307 } else {
308 devtools_agent_request_ = request.Pass(); 308 devtools_agent_request_ = request.Pass();
309 } 309 }
310 } 310 }
311 311
312 void HTMLDocument::Create( 312 void HTMLDocument::Create(
313 mojo::ApplicationConnection* connection, 313 mojo::ApplicationConnection* connection,
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
OLDNEW
« no previous file with comments | « components/html_viewer/html_document.h ('k') | components/html_viewer/html_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698