| Index: blimp/client/core/contents/blimp_contents_view_impl.h
|
| diff --git a/blimp/client/core/contents/blimp_contents_view_impl.h b/blimp/client/core/contents/blimp_contents_view_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..adde78e18c34a824fe89b9f8e000f853977b8964
|
| --- /dev/null
|
| +++ b/blimp/client/core/contents/blimp_contents_view_impl.h
|
| @@ -0,0 +1,56 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_VIEW_IMPL_H_
|
| +#define BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_VIEW_IMPL_H_
|
| +
|
| +#include <memory>
|
| +
|
| +#include "base/macros.h"
|
| +#include "base/memory/ref_counted.h"
|
| +#include "blimp/client/core/contents/ime_feature.h"
|
| +#include "blimp/client/public/contents/blimp_contents_view.h"
|
| +#include "ui/gfx/native_widget_types.h"
|
| +
|
| +namespace blimp {
|
| +namespace client {
|
| +class BlimpContentsImpl;
|
| +
|
| +// The internal generic implementation of a BlimpContentsView that implements
|
| +// the common functionality shared across platforms. Meant to be overridden and
|
| +// implemented for each supported platform.
|
| +class BlimpContentsViewImpl : public BlimpContentsView {
|
| + public:
|
| + // A factory method that needs to be implemented for each supported platform.
|
| + static std::unique_ptr<BlimpContentsViewImpl> Create(
|
| + BlimpContentsImpl* blimp_contents,
|
| + scoped_refptr<cc::Layer> contents_layer);
|
| +
|
| + virtual ~BlimpContentsViewImpl();
|
| +
|
| + // Exposes the plaform specific ImeFeature::Delegate. This should handle text
|
| + // input requests and present them to the user.
|
| + virtual ImeFeature::Delegate* GetImeDelegate() = 0;
|
| +
|
| + // BlimpContentsView implementation.
|
| + scoped_refptr<cc::Layer> GetLayer() override;
|
| + void SetSizeAndScale(const gfx::Size& size,
|
| + float device_scale_factor) override;
|
| + bool OnTouchEvent(const ui::MotionEvent& motion_event) override;
|
| +
|
| + protected:
|
| + BlimpContentsViewImpl(BlimpContentsImpl* blimp_contents,
|
| + scoped_refptr<cc::Layer> contents_layer);
|
| +
|
| + private:
|
| + BlimpContentsImpl* blimp_contents_;
|
| + scoped_refptr<cc::Layer> contents_layer_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(BlimpContentsViewImpl);
|
| +};
|
| +
|
| +} // namespace client
|
| +} // namespace blimp
|
| +
|
| +#endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_VIEW_IMPL_H_
|
|
|