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

Side by Side Diff: components/pdf_viewer/pdf_viewer.cc

Issue 1245683004: Mandoline: Merge Surfaces and Views apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed bot issues (I hope) Created 5 years, 4 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_frame.cc ('k') | components/view_manager/BUILD.gn » ('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 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/containers/hash_tables.h" 7 #include "base/containers/hash_tables.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "components/view_manager/public/cpp/lib/view_manager_client_impl.h" 9 #include "components/view_manager/public/cpp/lib/view_manager_client_impl.h"
10 #include "components/view_manager/public/cpp/types.h" 10 #include "components/view_manager/public/cpp/types.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 local_id_(0u), 67 local_id_(0u),
68 returner_binding_(this) { 68 returner_binding_(this) {
69 } 69 }
70 ~BitmapUploader() override { 70 ~BitmapUploader() override {
71 MojoGLES2DestroyContext(gles2_context_); 71 MojoGLES2DestroyContext(gles2_context_);
72 } 72 }
73 73
74 void Init(mojo::Shell* shell) { 74 void Init(mojo::Shell* shell) {
75 mojo::ServiceProviderPtr surfaces_service_provider; 75 mojo::ServiceProviderPtr surfaces_service_provider;
76 mojo::URLRequestPtr request(mojo::URLRequest::New()); 76 mojo::URLRequestPtr request(mojo::URLRequest::New());
77 request->url = mojo::String::From("mojo:surfaces_service"); 77 request->url = mojo::String::From("mojo:view_manager");
78 shell->ConnectToApplication(request.Pass(), 78 shell->ConnectToApplication(request.Pass(),
79 mojo::GetProxy(&surfaces_service_provider), 79 mojo::GetProxy(&surfaces_service_provider),
80 nullptr, nullptr); 80 nullptr, nullptr);
81 ConnectToService(surfaces_service_provider.get(), &surface_); 81 ConnectToService(surfaces_service_provider.get(), &surface_);
82 surface_->GetIdNamespace( 82 surface_->GetIdNamespace(
83 base::Bind(&BitmapUploader::SetIdNamespace, base::Unretained(this))); 83 base::Bind(&BitmapUploader::SetIdNamespace, base::Unretained(this)));
84 mojo::ResourceReturnerPtr returner_ptr; 84 mojo::ResourceReturnerPtr returner_ptr;
85 returner_binding_.Bind(GetProxy(&returner_ptr)); 85 returner_binding_.Bind(GetProxy(&returner_ptr));
86 surface_->SetResourceReturner(returner_ptr.Pass()); 86 surface_->SetResourceReturner(returner_ptr.Pass());
87 87
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 DISALLOW_COPY_AND_ASSIGN(PDFViewer); 534 DISALLOW_COPY_AND_ASSIGN(PDFViewer);
535 }; 535 };
536 536
537 } // namespace 537 } // namespace
538 } // namespace pdf_viewer 538 } // namespace pdf_viewer
539 539
540 MojoResult MojoMain(MojoHandle application_request) { 540 MojoResult MojoMain(MojoHandle application_request) {
541 mojo::ApplicationRunner runner(new pdf_viewer::PDFViewer()); 541 mojo::ApplicationRunner runner(new pdf_viewer::PDFViewer());
542 return runner.Run(application_request); 542 return runner.Run(application_request);
543 } 543 }
OLDNEW
« no previous file with comments | « components/html_viewer/html_frame.cc ('k') | components/view_manager/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698