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

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

Issue 1390353007: Adds MUSViewsInit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix windows 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/mus/public/cpp/view_tree_connection.h ('k') | components/web_view/frame_apptest.cc » ('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/mus/public/cpp/types.h" 9 #include "components/mus/public/cpp/types.h"
10 #include "components/mus/public/cpp/view.h" 10 #include "components/mus/public/cpp/view.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 delete it->second; 407 delete it->second;
408 embedder_for_roots_.erase(it); 408 embedder_for_roots_.erase(it);
409 if (embedder_for_roots_.size() == 0) 409 if (embedder_for_roots_.size() == 0)
410 app_.Quit(); 410 app_.Quit();
411 } 411 }
412 412
413 // Overridden from mojo::InterfaceFactory<mojo::ViewTreeClient>: 413 // Overridden from mojo::InterfaceFactory<mojo::ViewTreeClient>:
414 void Create( 414 void Create(
415 mojo::ApplicationConnection* connection, 415 mojo::ApplicationConnection* connection,
416 mojo::InterfaceRequest<mojo::ViewTreeClient> request) override { 416 mojo::InterfaceRequest<mojo::ViewTreeClient> request) override {
417 mus::ViewTreeConnection::Create(this, request.Pass()); 417 mus::ViewTreeConnection::Create(
418 this, request.Pass(),
419 mus::ViewTreeConnection::CreateType::DONT_WAIT_FOR_EMBED);
418 } 420 }
419 421
420 void DrawBitmap(EmbedderData* embedder_data) { 422 void DrawBitmap(EmbedderData* embedder_data) {
421 if (!doc_) 423 if (!doc_)
422 return; 424 return;
423 425
424 FPDF_PAGE page = FPDF_LoadPage(doc_, current_page_); 426 FPDF_PAGE page = FPDF_LoadPage(doc_, current_page_);
425 int width = static_cast<int>(FPDF_GetPageWidth(page)); 427 int width = static_cast<int>(FPDF_GetPageWidth(page));
426 int height = static_cast<int>(FPDF_GetPageHeight(page)); 428 int height = static_cast<int>(FPDF_GetPageHeight(page));
427 429
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 DISALLOW_COPY_AND_ASSIGN(PDFViewer); 517 DISALLOW_COPY_AND_ASSIGN(PDFViewer);
516 }; 518 };
517 519
518 } // namespace 520 } // namespace
519 } // namespace pdf_viewer 521 } // namespace pdf_viewer
520 522
521 MojoResult MojoMain(MojoHandle application_request) { 523 MojoResult MojoMain(MojoHandle application_request) {
522 mojo::ApplicationRunner runner(new pdf_viewer::PDFViewer()); 524 mojo::ApplicationRunner runner(new pdf_viewer::PDFViewer());
523 return runner.Run(application_request); 525 return runner.Run(application_request);
524 } 526 }
OLDNEW
« no previous file with comments | « components/mus/public/cpp/view_tree_connection.h ('k') | components/web_view/frame_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698