diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-26 18:24:06 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-26 18:24:06 +0000 |
commit | 9e77141f7b44164938dc3dafcf82c3bc90ef01cd (patch) | |
tree | 22dad00dd24a143a651d29ea0c7dcb2e4e568eaa /mojo/examples/surfaces_app | |
parent | 02089256b85fe7fe83d9088a372944e86ed59774 (diff) | |
download | chromium_src-9e77141f7b44164938dc3dafcf82c3bc90ef01cd.zip chromium_src-9e77141f7b44164938dc3dafcf82c3bc90ef01cd.tar.gz chromium_src-9e77141f7b44164938dc3dafcf82c3bc90ef01cd.tar.bz2 |
Remove extraneous namespaces
BUG=
Review URL: https://codereview.chromium.org/413353002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/examples/surfaces_app')
-rw-r--r-- | mojo/examples/surfaces_app/child.mojom | 4 | ||||
-rw-r--r-- | mojo/examples/surfaces_app/child_impl.cc | 16 | ||||
-rw-r--r-- | mojo/examples/surfaces_app/child_impl.h | 14 | ||||
-rw-r--r-- | mojo/examples/surfaces_app/embedder.cc | 6 | ||||
-rw-r--r-- | mojo/examples/surfaces_app/embedder.h | 4 | ||||
-rw-r--r-- | mojo/examples/surfaces_app/surfaces_app.cc | 18 |
6 files changed, 31 insertions, 31 deletions
diff --git a/mojo/examples/surfaces_app/child.mojom b/mojo/examples/surfaces_app/child.mojom index 926cad8..2fcb00d 100644 --- a/mojo/examples/surfaces_app/child.mojom +++ b/mojo/examples/surfaces_app/child.mojom @@ -7,6 +7,6 @@ import "mojo/services/public/interfaces/surfaces/quads.mojom" import "mojo/services/public/interfaces/surfaces/surface_id.mojom" interface Child { - ProduceFrame(mojo.surfaces.Color color, mojo.Size size) => - (mojo.surfaces.SurfaceId id); + ProduceFrame(mojo.Color color, mojo.Size size) => + (mojo.SurfaceId id); }; diff --git a/mojo/examples/surfaces_app/child_impl.cc b/mojo/examples/surfaces_app/child_impl.cc index e84e933..578c65c 100644 --- a/mojo/examples/surfaces_app/child_impl.cc +++ b/mojo/examples/surfaces_app/child_impl.cc @@ -33,13 +33,13 @@ ChildImpl::ChildImpl(ApplicationConnection* surfaces_service_connection) { } ChildImpl::~ChildImpl() { - surface_->DestroySurface(mojo::surfaces::SurfaceId::From(id_)); + surface_->DestroySurface(mojo::SurfaceId::From(id_)); } void ChildImpl::ProduceFrame( - surfaces::ColorPtr color, + ColorPtr color, SizePtr size, - const mojo::Callback<void(surfaces::SurfaceIdPtr id)>& callback) { + const mojo::Callback<void(SurfaceIdPtr id)>& callback) { color_ = color.To<SkColor>(); size_ = size.To<gfx::Size>(); produce_callback_ = callback; @@ -54,13 +54,13 @@ void ChildImpl::SetIdNamespace(uint32_t id_namespace) { } void ChildImpl::ReturnResources( - Array<surfaces::ReturnedResourcePtr> resources) { + Array<ReturnedResourcePtr> resources) { DCHECK(!resources.size()); } void ChildImpl::Draw() { id_ = allocator_->GenerateId(); - surface_->CreateSurface(mojo::surfaces::SurfaceId::From(id_), + surface_->CreateSurface(mojo::SurfaceId::From(id_), mojo::Size::From(size_)); gfx::Rect rect(size_); RenderPass::Id id(1, 1); @@ -84,9 +84,9 @@ void ChildImpl::Draw() { scoped_ptr<CompositorFrame> frame(new CompositorFrame); frame->delegated_frame_data = delegated_frame_data.Pass(); - surface_->SubmitFrame(mojo::surfaces::SurfaceId::From(id_), - mojo::surfaces::Frame::From(*frame)); - produce_callback_.Run(surfaces::SurfaceId::From(id_)); + surface_->SubmitFrame(mojo::SurfaceId::From(id_), + mojo::Frame::From(*frame)); + produce_callback_.Run(SurfaceId::From(id_)); } } // namespace examples diff --git a/mojo/examples/surfaces_app/child_impl.h b/mojo/examples/surfaces_app/child_impl.h index cdd5263..338b17f 100644 --- a/mojo/examples/surfaces_app/child_impl.h +++ b/mojo/examples/surfaces_app/child_impl.h @@ -30,7 +30,7 @@ class Surface; namespace examples { // Simple example of a child app using surfaces. -class ChildImpl : public InterfaceImpl<Child>, public surfaces::SurfaceClient { +class ChildImpl : public InterfaceImpl<Child>, public SurfaceClient { public: class Context { public: @@ -40,26 +40,26 @@ class ChildImpl : public InterfaceImpl<Child>, public surfaces::SurfaceClient { explicit ChildImpl(ApplicationConnection* surfaces_service_connection); virtual ~ChildImpl(); - // surfaces::SurfaceClient implementation + // SurfaceClient implementation virtual void SetIdNamespace(uint32_t id_namespace) OVERRIDE; virtual void ReturnResources( - Array<surfaces::ReturnedResourcePtr> resources) OVERRIDE; + Array<ReturnedResourcePtr> resources) OVERRIDE; private: // Child implementation. virtual void ProduceFrame( - surfaces::ColorPtr color, + ColorPtr color, SizePtr size, - const mojo::Callback<void(surfaces::SurfaceIdPtr id)>& callback) OVERRIDE; + const mojo::Callback<void(SurfaceIdPtr id)>& callback) OVERRIDE; void Draw(); SkColor color_; gfx::Size size_; scoped_ptr<cc::SurfaceIdAllocator> allocator_; - surfaces::SurfacePtr surface_; + SurfacePtr surface_; cc::SurfaceId id_; - mojo::Callback<void(surfaces::SurfaceIdPtr id)> produce_callback_; + mojo::Callback<void(SurfaceIdPtr id)> produce_callback_; DISALLOW_COPY_AND_ASSIGN(ChildImpl); }; diff --git a/mojo/examples/surfaces_app/embedder.cc b/mojo/examples/surfaces_app/embedder.cc index 1a620d0..a23a958 100644 --- a/mojo/examples/surfaces_app/embedder.cc +++ b/mojo/examples/surfaces_app/embedder.cc @@ -26,7 +26,7 @@ using cc::SolidColorDrawQuad; using cc::DelegatedFrameData; using cc::CompositorFrame; -Embedder::Embedder(surfaces::Surface* surface) : surface_(surface) { +Embedder::Embedder(Surface* surface) : surface_(surface) { } Embedder::~Embedder() { @@ -84,8 +84,8 @@ void Embedder::ProduceFrame(cc::SurfaceId child_one, scoped_ptr<CompositorFrame> frame(new CompositorFrame); frame->delegated_frame_data = delegated_frame_data.Pass(); - surface_->SubmitFrame(mojo::surfaces::SurfaceId::From(id_), - mojo::surfaces::Frame::From(*frame)); + surface_->SubmitFrame(mojo::SurfaceId::From(id_), + mojo::Frame::From(*frame)); } } // namespace examples diff --git a/mojo/examples/surfaces_app/embedder.h b/mojo/examples/surfaces_app/embedder.h index 4e04dfd..56212f3 100644 --- a/mojo/examples/surfaces_app/embedder.h +++ b/mojo/examples/surfaces_app/embedder.h @@ -23,7 +23,7 @@ namespace examples { // Simple example of a surface embedder that embeds two other surfaces. class Embedder { public: - explicit Embedder(surfaces::Surface* surface); + explicit Embedder(Surface* surface); ~Embedder(); void SetSurfaceId(cc::SurfaceId id) { id_ = id; } @@ -35,7 +35,7 @@ class Embedder { private: cc::SurfaceId id_; - surfaces::Surface* surface_; + Surface* surface_; DISALLOW_COPY_AND_ASSIGN(Embedder); }; diff --git a/mojo/examples/surfaces_app/surfaces_app.cc b/mojo/examples/surfaces_app/surfaces_app.cc index ca5e36f..30c0ec02 100644 --- a/mojo/examples/surfaces_app/surfaces_app.cc +++ b/mojo/examples/surfaces_app/surfaces_app.cc @@ -22,7 +22,7 @@ namespace mojo { namespace examples { class SurfacesApp : public ApplicationDelegate, - public surfaces::SurfaceClient, + public SurfaceClient, public NativeViewportClient { public: SurfacesApp() {} @@ -46,11 +46,11 @@ class SurfacesApp : public ApplicationDelegate, child_size_ = gfx::Size(size_.width() / 3, size_.height() / 2); connection->ConnectToService("mojo:mojo_surfaces_child_app", &child_one_); connection->ConnectToService("mojo:mojo_surfaces_child_app", &child_two_); - child_one_->ProduceFrame(surfaces::Color::From(SK_ColorBLUE), + child_one_->ProduceFrame(Color::From(SK_ColorBLUE), Size::From(child_size_), base::Bind(&SurfacesApp::ChildOneProducedFrame, base::Unretained(this))); - child_two_->ProduceFrame(surfaces::Color::From(SK_ColorGREEN), + child_two_->ProduceFrame(Color::From(SK_ColorGREEN), Size::From(child_size_), base::Bind(&SurfacesApp::ChildTwoProducedFrame, base::Unretained(this))); @@ -58,12 +58,12 @@ class SurfacesApp : public ApplicationDelegate, return true; } - void ChildOneProducedFrame(surfaces::SurfaceIdPtr id) { + void ChildOneProducedFrame(SurfaceIdPtr id) { child_one_id_ = id.To<cc::SurfaceId>(); Draw(45.0); } - void ChildTwoProducedFrame(surfaces::SurfaceIdPtr id) { + void ChildTwoProducedFrame(SurfaceIdPtr id) { child_two_id_ = id.To<cc::SurfaceId>(); Draw(45.0); } @@ -75,7 +75,7 @@ class SurfacesApp : public ApplicationDelegate, viewport_->CreateGLES2Context(Get(&cb)); surfaces_->CreateGLES2BoundSurface( cb.Pass(), - surfaces::SurfaceId::From(onscreen_id_), + SurfaceId::From(onscreen_id_), Size::From(size_)); embedder_->SetSurfaceId(onscreen_id_); } @@ -90,13 +90,13 @@ class SurfacesApp : public ApplicationDelegate, base::TimeDelta::FromMilliseconds(17)); } - // surfaces::SurfaceClient implementation. + // SurfaceClient implementation. virtual void SetIdNamespace(uint32_t id_namespace) OVERRIDE { allocator_.reset(new cc::SurfaceIdAllocator(id_namespace)); Draw(45.0); } virtual void ReturnResources( - Array<surfaces::ReturnedResourcePtr> resources) OVERRIDE { + Array<ReturnedResourcePtr> resources) OVERRIDE { DCHECK(!resources.size()); } @@ -112,7 +112,7 @@ class SurfacesApp : public ApplicationDelegate, } private: - surfaces::SurfacePtr surfaces_; + SurfacePtr surfaces_; cc::SurfaceId onscreen_id_; scoped_ptr<cc::SurfaceIdAllocator> allocator_; scoped_ptr<Embedder> embedder_; |