summaryrefslogtreecommitdiffstats
path: root/content/renderer/render_widget_owner_delegate.h
blob: 4c76ddd19bd31f2326a025c41ad99749442505ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// 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 CONTENT_RENDERER_RENDER_WIDGET_OWNER_DELEGATE_H_
#define CONTENT_RENDERER_RENDER_WIDGET_OWNER_DELEGATE_H_

#include "content/common/content_export.h"

namespace blink {
class WebGestureEvent;
class WebMouseEvent;
}

namespace gfx {
class Point;
}

namespace content {

//
// RenderWidgetOwnerDelegate
//
//  An interface implemented by an object owning a RenderWidget. This is
//  intended to be temporary until the RenderViewImpl and RenderWidget classes
//  are disentangled; see http://crbug.com/583347 and http://crbug.com/478281.
class CONTENT_EXPORT RenderWidgetOwnerDelegate {
 public:
  // The RenderWidget set a color profile.
  virtual void RenderWidgetDidSetColorProfile(
      const std::vector<char>& color_profile) = 0;

  // As in RenderWidgetInputHandlerDelegate.
  virtual void RenderWidgetFocusChangeComplete() = 0;
  virtual bool DoesRenderWidgetHaveTouchEventHandlersAt(
      const gfx::Point& point) const = 0;
  virtual void RenderWidgetDidHandleKeyEvent() = 0;
  virtual bool RenderWidgetWillHandleGestureEvent(
      const blink::WebGestureEvent& event) = 0;
  virtual bool RenderWidgetWillHandleMouseEvent(
      const blink::WebMouseEvent& event) = 0;

  // Painting notifications. RenderWidgetDidCommitAndDrawCompositorFrame happens
  // when that has completed, and subsequent rendering won't affect the painted
  // content. DidFlushPaint happens once we've received the ACK that the screen
  // has been updated. For a given paint operation, these overrides will always
  // be called in the order RenderWidgetDidCommitAndDrawCompositorFrame,
  // RenderWidgetDidFlushPaint.
  virtual void RenderWidgetDidCommitAndDrawCompositorFrame() = 0;
  virtual void RenderWidgetDidFlushPaint() = 0;

 protected:
  virtual ~RenderWidgetOwnerDelegate() {}
};

}  // namespace content

#endif  // CONTENT_RENDERER_RENDER_WIDGET_OWNER_DELEGATE_H_