~osomon/oxide/camera-names-i18n

« back to all changes in this revision

Viewing changes to shared/test/oxide_test_web_contents_view.h

  • Committer: Chris Coulson
  • Date: 2016-04-20 16:54:36 UTC
  • Revision ID: chris.coulson@canonical.com-20160420165436-4dpm7x985qytm8fl
CertificateErrorDispatcherClient only has a single method, so just convert it in to a callback. In addition to that, add thorough unit tests for CertificateErrorDispatcher

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// vim:expandtab:shiftwidth=2:tabstop=2:
 
2
// Copyright (C) 2016 Canonical Ltd.
 
3
 
 
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.
 
8
 
 
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.
 
13
 
 
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
 
17
 
 
18
#ifndef _OXIDE_SHARED_TEST_TEST_WEB_CONTENTS_VIEW_H_
 
19
#define _OXIDE_SHARED_TEST_TEST_WEB_CONTENTS_VIEW_H_
 
20
 
 
21
#include "ui/gfx/geometry/size.h"
 
22
 
 
23
#include "shared/port/content/browser/web_contents_view_oxide.h"
 
24
 
 
25
namespace content {
 
26
class WebContents;
 
27
}
 
28
 
 
29
namespace oxide {
 
30
 
 
31
class TestWebContentsView : public content::WebContentsViewOxide {
 
32
 public:
 
33
  static content::WebContentsViewOxide* Create(content::WebContents* contents);
 
34
  ~TestWebContentsView() override;
 
35
 
 
36
 private:
 
37
  TestWebContentsView();
 
38
 
 
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;
 
62
 
 
63
  gfx::Size size_;
 
64
};
 
65
 
 
66
} // namespace oxide
 
67
 
 
68
#endif // _OXIDE_SHARED_TEST_TEST_WEB_CONTENTS_VIEW_H_