~chrisccoulson/oxide/lp1504853

« back to all changes in this revision

Viewing changes to shared/browser/oxide_render_widget_host_view_container.h

  • Committer: Chris Coulson
  • Date: 2015-10-21 19:06:54 UTC
  • mfrom: (1215.1.13 oxide)
  • Revision ID: chris.coulson@canonical.com-20151021190654-cfcbueitgzojv7jc
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// vim:expandtab:shiftwidth=2:tabstop=2:
2
 
// Copyright (C) 2014 Canonical Ltd.
 
2
// Copyright (C) 2014-2015 Canonical Ltd.
3
3
 
4
4
// This library is free software; you can redistribute it and/or
5
5
// modify it under the terms of the GNU Lesser General Public
15
15
// License along with this library; if not, write to the Free Software
16
16
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17
17
 
18
 
#ifndef _OXIDE_SHARED_BROWSER_RENDER_WIDGET_HOST_VIEW_DELEGATE_H_
19
 
#define _OXIDE_SHARED_BROWSER_RENDER_WIDGET_HOST_VIEW_DELEGATE_H_
20
 
 
 
18
#ifndef _OXIDE_SHARED_BROWSER_RENDER_WIDGET_HOST_VIEW_CONTAINER_H_
 
19
#define _OXIDE_SHARED_BROWSER_RENDER_WIDGET_HOST_VIEW_CONTAINER_H_
 
20
 
 
21
#include <vector>
 
22
 
 
23
#include "base/memory/ref_counted.h"
 
24
#include "content/public/common/menu_item.h"
21
25
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
22
 
#include "ui/base/ime/text_input_type.h"
23
26
#include "ui/gfx/geometry/rect.h"
24
27
#include "ui/gfx/geometry/size.h"
25
28
 
 
29
namespace cc {
 
30
class Layer;
 
31
}
 
32
 
26
33
namespace content {
27
 
class WebCursor;
 
34
struct ContextMenuParams;
 
35
class RenderFrameHost;
28
36
}
29
37
 
30
38
namespace gfx {
34
42
namespace oxide {
35
43
 
36
44
class Compositor;
37
 
class WebView;
 
45
class RenderWidgetHostView;
38
46
 
39
 
class RenderWidgetHostViewDelegate {
 
47
class RenderWidgetHostViewContainer {
40
48
 public:
41
 
  virtual ~RenderWidgetHostViewDelegate() {}
42
 
 
43
 
  virtual void EvictCurrentFrame() = 0;
44
 
 
45
 
  virtual void UpdateCursor(const content::WebCursor& cursor) = 0;
46
 
 
47
 
  virtual void TextInputStateChanged(ui::TextInputType type,
48
 
                                     bool show_ime_if_needed) = 0;
49
 
 
50
 
  virtual void FocusedNodeChanged(bool is_editable_node) = 0;
51
 
 
52
 
  virtual void ImeCancelComposition() = 0;
53
 
 
54
 
  virtual void SelectionBoundsChanged(const gfx::Rect& caret_rect,
55
 
                                      size_t selection_cursor_position,
56
 
                                      size_t selection_anchor_position) = 0;
57
 
 
58
 
  virtual void SelectionChanged() = 0;
 
49
  virtual ~RenderWidgetHostViewContainer() {}
59
50
 
60
51
  virtual Compositor* GetCompositor() const = 0;
61
52
 
 
53
  virtual void AttachLayer(scoped_refptr<cc::Layer> layer) = 0;
 
54
 
 
55
  virtual void DetachLayer(scoped_refptr<cc::Layer> layer) = 0;
 
56
 
 
57
  virtual void CursorChanged() = 0;
 
58
 
62
59
  virtual gfx::Size GetViewSizePix() const = 0;
63
60
 
64
61
  virtual gfx::Rect GetViewBoundsDip() const = 0;
65
62
 
66
63
  virtual blink::WebScreenInfo GetScreenInfo() const = 0;
67
64
 
68
 
  virtual bool HasFocus() const = 0;
 
65
  virtual bool HasFocus(const RenderWidgetHostView* view) const = 0;
69
66
 
70
67
  virtual bool IsVisible() const = 0;
71
68
 
72
69
  virtual float GetLocationBarHeightDip() const = 0;
 
70
 
 
71
  virtual void ShowContextMenu(content::RenderFrameHost* render_frame_host,
 
72
                               const content::ContextMenuParams& params) = 0;
 
73
 
 
74
  virtual void ShowPopupMenu(content::RenderFrameHost* render_frame_host,
 
75
                             const gfx::Rect& bounds,
 
76
                             int selected_item,
 
77
                             const std::vector<content::MenuItem>& items,
 
78
                             bool allow_multiple_selection) = 0;
 
79
  virtual void HidePopupMenu() = 0;
73
80
};
74
81
 
75
82
} // namespace oxide
76
83
 
77
 
#endif // _OXIDE_SHARED_BROWSER_RENDER_WIDGET_HOST_VIEW_DELEGATE_H_
 
84
#endif // _OXIDE_SHARED_BROWSER_RENDER_WIDGET_HOST_VIEW_CONTAINER_H_