Chromium Code Reviews| Index: third_party/WebKit/public/web/WebDocument.h |
| diff --git a/third_party/WebKit/public/web/WebDocument.h b/third_party/WebKit/public/web/WebDocument.h |
| index af9497b88337b948de03fb3dc6a995a22bfce308..717cb948b06467eaa2f68e46408a9033b1235e9f 100644 |
| --- a/third_party/WebKit/public/web/WebDocument.h |
| +++ b/third_party/WebKit/public/web/WebDocument.h |
| @@ -120,8 +120,14 @@ class WebDocument : public WebNode { |
| // Gets the accessibility object that has focus. |
| BLINK_EXPORT WebAXObject FocusedAccessibilityObject() const; |
| - // Inserts the given CSS source code as a stylesheet in the document. |
| - BLINK_EXPORT void InsertStyleSheet(const WebString& source_code); |
| + // Inserts the given CSS source code as a stylesheet in the document, and |
| + // return its id. |
| + BLINK_EXPORT int InsertStyleSheet(const WebString& source_code); |
|
rune
2017/05/16 09:00:59
Could you use a typedef with a suitable id type na
limasdf
2017/05/18 12:32:53
Done.
|
| + |
| + // Removes the CSS which was previously inserted by a call to |
| + // InsertStyleSheet(). Returns true on success. False means that there's no |
| + // corresponding stylesheet. |
| + BLINK_EXPORT bool RemoveInsertedStyleSheet(int id); |
|
rune
2017/05/16 09:00:59
Is a return value necessary here?
limasdf
2017/05/18 12:32:53
I was thinking the extension api should return an
|
|
rune
2017/05/16 09:00:59
These API methods should have a unit test.
limasdf
2017/05/18 12:32:53
Done.
|
| // Arranges to call WebFrameClient::didMatchCSS(frame(), ...) when one of |
| // the selectors matches or stops matching an element in this document. |