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

Unified Diff: components/pdf_viewer/pdf_viewer.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: components/pdf_viewer/pdf_viewer.cc
diff --git a/components/pdf_viewer/pdf_viewer.cc b/components/pdf_viewer/pdf_viewer.cc
index e3816ddba14f3044e366ae8741c3e3a35b2a1524..ed5de3b9bb5cb715779e89d3e692de3c67652ce7 100644
--- a/components/pdf_viewer/pdf_viewer.cc
+++ b/components/pdf_viewer/pdf_viewer.cc
@@ -54,15 +54,15 @@ class PDFView : public mus::WindowTreeDelegate,
public:
using DeleteCallback = base::Callback<void(PDFView*)>;
- PDFView(mojo::ApplicationImpl* app,
+ PDFView(mojo::Shell* shell,
mojo::ApplicationConnection* connection,
FPDF_DOCUMENT doc,
const DeleteCallback& delete_callback)
- : app_ref_(app->app_lifetime_helper()->CreateAppRefCount()),
+ : app_ref_(shell->CreateAppRefCount()),
doc_(doc),
current_page_(0),
page_count_(FPDF_GetPageCount(doc_)),
- shell_(app->shell()),
+ shell_(shell),
root_(nullptr),
frame_client_binding_(this),
delete_callback_(delete_callback) {
@@ -228,7 +228,7 @@ class PDFView : public mus::WindowTreeDelegate,
scoped_ptr<bitmap_uploader::BitmapUploader> bitmap_uploader_;
- mojo::shell::mojom::Shell* shell_;
+ mojo::Shell* shell_;
mus::Window* root_;
web_view::mojom::FramePtr frame_;
@@ -353,8 +353,9 @@ class PDFViewer
private:
// ApplicationDelegate:
- void Initialize(mojo::ApplicationImpl* app) override {
- tracing_.Initialize(app);
+ void Initialize(mojo::Shell* shell, const std::string& url,
+ uint32_t id) override {
+ tracing_.Initialize(shell, url);
}
bool AcceptConnection(
« no previous file with comments | « components/mus/ws/window_tree_unittest.cc ('k') | components/resource_provider/public/cpp/resource_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698