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

Side by Side Diff: public/web/WebPlugin.h

Issue 1033603007: Blink: Pass 'unobscured' rect to WebPlugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 | « Source/web/tests/FakeWebPlugin.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 virtual bool supportsKeyboardFocus() const { return false; } 82 virtual bool supportsKeyboardFocus() const { return false; }
83 virtual bool supportsEditCommands() const { return false; } 83 virtual bool supportsEditCommands() const { return false; }
84 // Returns true if this plugin supports input method, which implements 84 // Returns true if this plugin supports input method, which implements
85 // setComposition() and confirmComposition() below. 85 // setComposition() and confirmComposition() below.
86 virtual bool supportsInputMethod() const { return false; } 86 virtual bool supportsInputMethod() const { return false; }
87 87
88 virtual bool canProcessDrag() const { return false; } 88 virtual bool canProcessDrag() const { return false; }
89 89
90 virtual void paint(WebCanvas*, const WebRect&) = 0; 90 virtual void paint(WebCanvas*, const WebRect&) = 0;
91 91
92 // DEPRECATED. TODO(tommycli): Remove once embedders migrate to the new inte rface.
93 virtual void updateGeometry(
94 const WebRect& windowRect, const WebRect& clipRect,
95 const WebVector<WebRect>& cutOutsRects, bool isVisible) { }
96
92 // Coordinates are relative to the containing window. 97 // Coordinates are relative to the containing window.
93 virtual void updateGeometry( 98 virtual void updateGeometry(
94 const WebRect& frameRect, const WebRect& clipRect, 99 const WebRect& windowRect, const WebRect& clipRect,
95 const WebVector<WebRect>& cutOutsRects, bool isVisible) = 0; 100 const WebRect& unobscuredRect, const WebVector<WebRect>& cutOutsRects,
101 bool isVisible) {
102 // TODO(tommycli): This default implementation calls the old, deprecated interface. This method should be pure virtual after the deprecated interface is removed.
103 updateGeometry(windowRect, clipRect, cutOutsRects, isVisible);
104 }
96 105
97 virtual void updateFocus(bool focused, WebFocusType) = 0; 106 virtual void updateFocus(bool focused, WebFocusType) = 0;
98 107
99 virtual void updateVisibility(bool) = 0; 108 virtual void updateVisibility(bool) = 0;
100 109
101 virtual bool acceptsInputEvents() = 0; 110 virtual bool acceptsInputEvents() = 0;
102 virtual bool handleInputEvent(const WebInputEvent&, WebCursorInfo&) = 0; 111 virtual bool handleInputEvent(const WebInputEvent&, WebCursorInfo&) = 0;
103 112
104 virtual bool handleDragStatusUpdate(WebDragStatus, const WebDragData&, WebDr agOperationsMask, const WebPoint& position, const WebPoint& screenPosition) { re turn false; } 113 virtual bool handleDragStatusUpdate(WebDragStatus, const WebDragData&, WebDr agOperationsMask, const WebPoint& position, const WebPoint& screenPosition) { re turn false; }
105 114
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 virtual bool isPlaceholder() { return true; } 189 virtual bool isPlaceholder() { return true; }
181 virtual bool shouldPersist() const { return false; } 190 virtual bool shouldPersist() const { return false; }
182 191
183 protected: 192 protected:
184 ~WebPlugin() { } 193 ~WebPlugin() { }
185 }; 194 };
186 195
187 } // namespace blink 196 } // namespace blink
188 197
189 #endif 198 #endif
OLDNEW
« no previous file with comments | « Source/web/tests/FakeWebPlugin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698