Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: ui/views/widget/native_widget_delegate.h

Issue 1057873004: Pass a ui::PaintContext from ui::Layer to layer delegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layer-paintcontext: mac Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_
6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ui/events/event_constants.h" 10 #include "ui/events/event_constants.h"
11 #include "ui/views/views_export.h" 11 #include "ui/views/views_export.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class Canvas; 14 class Canvas;
15 class Path; 15 class Path;
16 class Point; 16 class Point;
17 class Size; 17 class Size;
18 } 18 }
19 19
20 namespace ui { 20 namespace ui {
21 class GestureEvent; 21 class GestureEvent;
22 class KeyEvent; 22 class KeyEvent;
23 class Layer; 23 class Layer;
24 class MouseEvent; 24 class MouseEvent;
25 class PaintContext;
26 class ScrollEvent;
25 class TouchEvent; 27 class TouchEvent;
26 class ScrollEvent;
27 } 28 }
28 29
29 namespace views { 30 namespace views {
30 class InputMethod; 31 class InputMethod;
31 class Widget; 32 class Widget;
32 33
33 namespace internal { 34 namespace internal {
34 35
35 //////////////////////////////////////////////////////////////////////////////// 36 ////////////////////////////////////////////////////////////////////////////////
36 // NativeWidgetDelegate 37 // NativeWidgetDelegate
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 virtual void OnNativeWidgetEndUserBoundsChange() = 0; 104 virtual void OnNativeWidgetEndUserBoundsChange() = 0;
104 105
105 // Returns true if the delegate has a FocusManager. 106 // Returns true if the delegate has a FocusManager.
106 virtual bool HasFocusManager() const = 0; 107 virtual bool HasFocusManager() const = 0;
107 108
108 // Paints the widget using acceleration. If the widget is not using 109 // Paints the widget using acceleration. If the widget is not using
109 // accelerated painting this returns false and does nothing. 110 // accelerated painting this returns false and does nothing.
110 virtual bool OnNativeWidgetPaintAccelerated( 111 virtual bool OnNativeWidgetPaintAccelerated(
111 const gfx::Rect& dirty_region) = 0; 112 const gfx::Rect& dirty_region) = 0;
112 113
113 // Paints the rootview in the canvas. This will also refresh the compositor 114 // Paints the rootview in the context. This will also refresh the compositor
114 // tree if necessary when accelerated painting is enabled. 115 // tree if necessary.
115 virtual void OnNativeWidgetPaint(gfx::Canvas* canvas) = 0; 116 virtual void OnNativeWidgetPaint(const ui::PaintContext& context) = 0;
116 117
117 // Returns the non-client component (see ui/base/hit_test.h) containing 118 // Returns the non-client component (see ui/base/hit_test.h) containing
118 // |point|, in client coordinates. 119 // |point|, in client coordinates.
119 virtual int GetNonClientComponent(const gfx::Point& point) = 0; 120 virtual int GetNonClientComponent(const gfx::Point& point) = 0;
120 121
121 // Mouse and key event handlers. 122 // Mouse and key event handlers.
122 virtual void OnKeyEvent(ui::KeyEvent* event) = 0; 123 virtual void OnKeyEvent(ui::KeyEvent* event) = 0;
123 virtual void OnMouseEvent(ui::MouseEvent* event) = 0; 124 virtual void OnMouseEvent(ui::MouseEvent* event) = 0;
124 virtual void OnMouseCaptureLost() = 0; 125 virtual void OnMouseCaptureLost() = 0;
125 126
(...skipping 27 matching lines...) Expand all
153 // later. Returns true if the initial focus has been set or the window should 154 // later. Returns true if the initial focus has been set or the window should
154 // not set the initial focus, or false if the caller should set the initial 155 // not set the initial focus, or false if the caller should set the initial
155 // focus (if any). 156 // focus (if any).
156 virtual bool SetInitialFocus(ui::WindowShowState show_state) = 0; 157 virtual bool SetInitialFocus(ui::WindowShowState show_state) = 0;
157 }; 158 };
158 159
159 } // namespace internal 160 } // namespace internal
160 } // namespace views 161 } // namespace views
161 162
162 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ 163 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698