| Index: components/pdf_viewer/pdf_viewer.cc
|
| diff --git a/components/pdf_viewer/pdf_viewer.cc b/components/pdf_viewer/pdf_viewer.cc
|
| index 5a1dcf268ec37c54073d9b6c78dac8e68c2c3203..40fbc3cb2e6a228240d55562536e19aac1adba48 100644
|
| --- a/components/pdf_viewer/pdf_viewer.cc
|
| +++ b/components/pdf_viewer/pdf_viewer.cc
|
| @@ -58,7 +58,7 @@
|
| // BitmapUploader is useful if you want to draw a bitmap or color in a View.
|
| class BitmapUploader : public mojo::SurfaceClient {
|
| public:
|
| - explicit BitmapUploader(mus::View* view)
|
| + explicit BitmapUploader(mojo::View* view)
|
| : view_(view),
|
| color_(g_transparent_color),
|
| width_(0),
|
| @@ -67,7 +67,8 @@
|
| next_resource_id_(1u),
|
| id_namespace_(0u),
|
| local_id_(0u),
|
| - returner_binding_(this) {}
|
| + returner_binding_(this) {
|
| + }
|
| ~BitmapUploader() override {
|
| MojoGLES2DestroyContext(gles2_context_);
|
| }
|
| @@ -288,9 +289,9 @@
|
| }
|
| }
|
|
|
| - mus::View* view_;
|
| + mojo::View* view_;
|
| mojo::GpuPtr gpu_service_;
|
| - scoped_ptr<mus::ViewSurface> surface_;
|
| + scoped_ptr<mojo::ViewSurface> surface_;
|
| MojoGLES2Context gles2_context_;
|
|
|
| mojo::Size size_;
|
| @@ -310,7 +311,7 @@
|
|
|
| class EmbedderData {
|
| public:
|
| - EmbedderData(mojo::Shell* shell, mus::View* root) : bitmap_uploader_(root) {
|
| + EmbedderData(mojo::Shell* shell, mojo::View* root) : bitmap_uploader_(root) {
|
| bitmap_uploader_.Init(shell);
|
| bitmap_uploader_.SetColor(g_background_color);
|
| }
|
| @@ -324,8 +325,8 @@
|
| };
|
|
|
| class PDFView : public mojo::ApplicationDelegate,
|
| - public mus::ViewTreeDelegate,
|
| - public mus::ViewObserver,
|
| + public mojo::ViewTreeDelegate,
|
| + public mojo::ViewObserver,
|
| public mojo::InterfaceFactory<mojo::ViewTreeClient> {
|
| public:
|
| PDFView(mojo::InterfaceRequest<mojo::Application> request,
|
| @@ -354,7 +355,7 @@
|
| }
|
|
|
| // Overridden from ViewTreeDelegate:
|
| - void OnEmbed(mus::View* root) override {
|
| + void OnEmbed(mojo::View* root) override {
|
| DCHECK(embedder_for_roots_.find(root) == embedder_for_roots_.end());
|
| root->AddObserver(this);
|
| EmbedderData* embedder_data = new EmbedderData(app_.shell(), root);
|
| @@ -362,17 +363,18 @@
|
| DrawBitmap(embedder_data);
|
| }
|
|
|
| - void OnConnectionLost(mus::ViewTreeConnection* connection) override {}
|
| + void OnConnectionLost(mojo::ViewTreeConnection* connection) override {}
|
|
|
| // Overridden from ViewObserver:
|
| - void OnViewBoundsChanged(mus::View* view,
|
| + void OnViewBoundsChanged(mojo::View* view,
|
| const mojo::Rect& old_bounds,
|
| const mojo::Rect& new_bounds) override {
|
| DCHECK(embedder_for_roots_.find(view) != embedder_for_roots_.end());
|
| DrawBitmap(embedder_for_roots_[view]);
|
| }
|
|
|
| - void OnViewInputEvent(mus::View* view, const mojo::EventPtr& event) override {
|
| + void OnViewInputEvent(mojo::View* view,
|
| + const mojo::EventPtr& event) override {
|
| DCHECK(embedder_for_roots_.find(view) != embedder_for_roots_.end());
|
| if (event->key_data &&
|
| (event->action != mojo::EVENT_TYPE_KEY_PRESSED ||
|
| @@ -398,7 +400,7 @@
|
| }
|
| }
|
|
|
| - void OnViewDestroyed(mus::View* view) override {
|
| + void OnViewDestroyed(mojo::View* view) override {
|
| DCHECK(embedder_for_roots_.find(view) != embedder_for_roots_.end());
|
| const auto& it = embedder_for_roots_.find(view);
|
| DCHECK(it != embedder_for_roots_.end());
|
| @@ -412,7 +414,7 @@
|
| void Create(
|
| mojo::ApplicationConnection* connection,
|
| mojo::InterfaceRequest<mojo::ViewTreeClient> request) override {
|
| - mus::ViewTreeConnection::Create(this, request.Pass());
|
| + mojo::ViewTreeConnection::Create(this, request.Pass());
|
| }
|
|
|
| void DrawBitmap(EmbedderData* embedder_data) {
|
| @@ -461,7 +463,7 @@
|
| int current_page_;
|
| int page_count_;
|
| FPDF_DOCUMENT doc_;
|
| - std::map<mus::View*, EmbedderData*> embedder_for_roots_;
|
| + std::map<mojo::View*, EmbedderData*> embedder_for_roots_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PDFView);
|
| };
|
|
|