1
// vim:expandtab:shiftwidth=2:tabstop=2:
2
// Copyright (C) 2016 Canonical Ltd.
4
// This library is free software; you can redistribute it and/or
5
// modify it under the terms of the GNU Lesser General Public
6
// License as published by the Free Software Foundation; either
7
// version 2.1 of the License, or (at your option) any later version.
9
// This library is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
// Lesser General Public License for more details.
14
// You should have received a copy of the GNU Lesser General Public
15
// License along with this library; if not, write to the Free Software
16
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
#ifndef _OXIDE_SHARED_TEST_TEST_WEB_CONTENTS_VIEW_H_
19
#define _OXIDE_SHARED_TEST_TEST_WEB_CONTENTS_VIEW_H_
21
#include "ui/gfx/geometry/size.h"
23
#include "shared/port/content/browser/web_contents_view_oxide.h"
31
class TestWebContentsView : public content::WebContentsViewOxide {
33
static content::WebContentsViewOxide* Create(content::WebContents* contents);
34
~TestWebContentsView() override;
37
TestWebContentsView();
39
// content::WebContentsView implementation
40
gfx::NativeView GetNativeView() const override;
41
gfx::NativeView GetContentNativeView() const override;
42
gfx::NativeWindow GetTopLevelNativeWindow() const override;
43
void GetContainerBounds(gfx::Rect* out) const override;
44
void SizeContents(const gfx::Size& size) override;
45
void Focus() override;
46
void SetInitialFocus() override;
47
void StoreFocus() override;
48
void RestoreFocus() override;
49
content::DropData* GetDropData() const override;
50
gfx::Rect GetViewBounds() const override;
51
void CreateView(const gfx::Size& initial_size,
52
gfx::NativeView context) override;
53
content::RenderWidgetHostViewBase* CreateViewForWidget(
54
content::RenderWidgetHost* render_widget_host,
55
bool is_guest_view_hack) override;
56
content::RenderWidgetHostViewBase* CreateViewForPopupWidget(
57
content::RenderWidgetHost* render_widget_host) override;
58
void SetPageTitle(const base::string16& title) override;
59
void RenderViewCreated(content::RenderViewHost* host) override;
60
void RenderViewSwappedIn(content::RenderViewHost* host) override;
61
void SetOverscrollControllerEnabled(bool enabled) override;
68
#endif // _OXIDE_SHARED_TEST_TEST_WEB_CONTENTS_VIEW_H_