This source file includes following definitions.
- Init
- Show
- Hide
- Close
- GetSize
- SetBounds
- Create
#include "mojo/services/native_viewport/native_viewport.h"
namespace mojo {
namespace services {
class NativeViewportStub : public NativeViewport {
public:
NativeViewportStub(NativeViewportDelegate* delegate)
: delegate_(delegate) {
}
virtual ~NativeViewportStub() {
}
private:
virtual void Init() OVERRIDE {
}
virtual void Show() OVERRIDE {
}
virtual void Hide() OVERRIDE {
}
virtual void Close() OVERRIDE {
delegate_->OnDestroyed();
}
virtual gfx::Size GetSize() OVERRIDE {
return gfx::Size();
}
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE {
}
NativeViewportDelegate* delegate_;
DISALLOW_COPY_AND_ASSIGN(NativeViewportStub);
};
scoped_ptr<NativeViewport> NativeViewport::Create(
shell::Context* context,
NativeViewportDelegate* delegate) {
return scoped_ptr<NativeViewport>(new NativeViewportStub(delegate)).Pass();
}
}
}