| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 virtual void setMainFrame(WebFrame*) = 0; | 64 virtual void setMainFrame(WebFrame*) = 0; |
| 65 | 65 |
| 66 // Initializes the various client interfaces. | 66 // Initializes the various client interfaces. |
| 67 virtual void setSpellCheckClient(WebSpellCheckClient*) = 0; | 67 virtual void setSpellCheckClient(WebSpellCheckClient*) = 0; |
| 68 | 68 |
| 69 // Options ------------------------------------------------------------- | 69 // Options ------------------------------------------------------------- |
| 70 | 70 |
| 71 // The returned pointer is valid for the lifetime of the WebView. | 71 // The returned pointer is valid for the lifetime of the WebView. |
| 72 virtual WebSettings* settings() = 0; | 72 virtual WebSettings* settings() = 0; |
| 73 | 73 |
| 74 // Corresponds to the encoding of the main frame. Setting the page | |
| 75 // encoding may cause the main frame to reload. | |
| 76 virtual WebString pageEncoding() const = 0; | |
| 77 virtual void setPageEncoding(const WebString&) = 0; | |
| 78 | |
| 79 // Makes the WebView transparent. This is useful if you want to have | 74 // Makes the WebView transparent. This is useful if you want to have |
| 80 // some custom background rendered behind it. | 75 // some custom background rendered behind it. |
| 81 virtual bool isTransparent() const = 0; | 76 virtual bool isTransparent() const = 0; |
| 82 virtual void setIsTransparent(bool) = 0; | 77 virtual void setIsTransparent(bool) = 0; |
| 83 | 78 |
| 84 // Sets the base color used for this WebView's background. This is in effect | 79 // Sets the base color used for this WebView's background. This is in effect |
| 85 // the default background color used for pages with no background-color | 80 // the default background color used for pages with no background-color |
| 86 // style in effect, or used as the alpha-blended basis for any pages with | 81 // style in effect, or used as the alpha-blended basis for any pages with |
| 87 // translucent background-color style. (For pages with opaque | 82 // translucent background-color style. (For pages with opaque |
| 88 // background-color style, this property is effectively ignored). | 83 // background-color style, this property is effectively ignored). |
| 89 // Setting this takes effect for the currently loaded page, if any, and | 84 // Setting this takes effect for the currently loaded page, if any, and |
| 90 // persists across subsequent navigations. Defaults to white prior to the | 85 // persists across subsequent navigations. Defaults to white prior to the |
| 91 // first call to this method. | 86 // first call to this method. |
| 92 virtual void setBaseBackgroundColor(WebColor) = 0; | 87 virtual void setBaseBackgroundColor(WebColor) = 0; |
| 93 | 88 |
| 94 // Controls whether pressing Tab key advances focus to links. | |
| 95 virtual bool tabsToLinks() const = 0; | |
| 96 virtual void setTabsToLinks(bool) = 0; | |
| 97 | |
| 98 // Controls the WebView's active state, which may affect the rendering | 89 // Controls the WebView's active state, which may affect the rendering |
| 99 // of elements on the page (i.e., tinting of input elements). | 90 // of elements on the page (i.e., tinting of input elements). |
| 100 virtual bool isActive() const = 0; | 91 virtual bool isActive() const = 0; |
| 101 virtual void setIsActive(bool) = 0; | 92 virtual void setIsActive(bool) = 0; |
| 102 | 93 |
| 103 // Frames -------------------------------------------------------------- | 94 // Frames -------------------------------------------------------------- |
| 104 | 95 |
| 105 virtual WebFrame* mainFrame() = 0; | 96 virtual WebFrame* mainFrame() = 0; |
| 106 | 97 |
| 107 virtual void injectModule(const WebString& path) = 0; | 98 virtual void injectModule(const WebString& path) = 0; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 138 // Do a hit test at given point and return the HitTestResult. | 129 // Do a hit test at given point and return the HitTestResult. |
| 139 virtual WebHitTestResult hitTestResultAt(const WebPoint&) = 0; | 130 virtual WebHitTestResult hitTestResultAt(const WebPoint&) = 0; |
| 140 | 131 |
| 141 // Retrieves a list of spelling markers. | 132 // Retrieves a list of spelling markers. |
| 142 virtual void spellingMarkers(WebVector<uint32_t>* markers) = 0; | 133 virtual void spellingMarkers(WebVector<uint32_t>* markers) = 0; |
| 143 virtual void removeSpellingMarkersUnderWords(const WebVector<WebString>& wor
ds) = 0; | 134 virtual void removeSpellingMarkersUnderWords(const WebVector<WebString>& wor
ds) = 0; |
| 144 | 135 |
| 145 | 136 |
| 146 // Developer tools ----------------------------------------------------- | 137 // Developer tools ----------------------------------------------------- |
| 147 | 138 |
| 148 // Set an override of device scale factor passed from WebView to | |
| 149 // compositor. Pass zero to cancel override. This is used to implement | |
| 150 // device metrics emulation. | |
| 151 virtual void setCompositorDeviceScaleFactorOverride(float) = 0; | |
| 152 | |
| 153 virtual void setShowPaintRects(bool) = 0; | 139 virtual void setShowPaintRects(bool) = 0; |
| 154 virtual void setContinuousPaintingEnabled(bool) = 0; | |
| 155 virtual void setShowScrollBottleneckRects(bool) = 0; | 140 virtual void setShowScrollBottleneckRects(bool) = 0; |
| 156 | 141 |
| 157 // Visibility ----------------------------------------------------------- | 142 // Visibility ----------------------------------------------------------- |
| 158 | 143 |
| 159 // Sets the visibility of the WebView. | 144 // Sets the visibility of the WebView. |
| 160 virtual void setVisibilityState(WebPageVisibilityState visibilityState, | 145 virtual void setVisibilityState(WebPageVisibilityState visibilityState, |
| 161 bool isInitialState) { } | 146 bool isInitialState) { } |
| 162 | 147 |
| 163 // i18n ----------------------------------------------------------------- | 148 // i18n ----------------------------------------------------------------- |
| 164 | 149 |
| 165 // Inform the WebView that the accept languages have changed. | 150 // Inform the WebView that the accept languages have changed. |
| 166 // If the WebView wants to get the accept languages value, it will have | 151 // If the WebView wants to get the accept languages value, it will have |
| 167 // to call the WebViewClient::acceptLanguages(). | 152 // to call the WebViewClient::acceptLanguages(). |
| 168 virtual void acceptLanguagesChanged() = 0; | 153 virtual void acceptLanguagesChanged() = 0; |
| 169 | 154 |
| 170 // Testing functionality for TestRunner --------------------------------- | 155 // Testing functionality for TestRunner --------------------------------- |
| 171 | 156 |
| 172 protected: | 157 protected: |
| 173 ~WebView() {} | 158 ~WebView() {} |
| 174 }; | 159 }; |
| 175 | 160 |
| 176 } // namespace blink | 161 } // namespace blink |
| 177 | 162 |
| 178 #endif // SKY_ENGINE_PUBLIC_WEB_WEBVIEW_H_ | 163 #endif // SKY_ENGINE_PUBLIC_WEB_WEBVIEW_H_ |
| OLD | NEW |