| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 class WebSettings; | 48 class WebSettings; |
| 49 class WebSpellCheckClient; | 49 class WebSpellCheckClient; |
| 50 class WebString; | 50 class WebString; |
| 51 class WebViewClient; | 51 class WebViewClient; |
| 52 struct WebActiveWheelFlingParameters; | 52 struct WebActiveWheelFlingParameters; |
| 53 struct WebPoint; | 53 struct WebPoint; |
| 54 struct WebFloatPoint; | 54 struct WebFloatPoint; |
| 55 | 55 |
| 56 class WebView : public WebWidget { | 56 class WebView : public WebWidget { |
| 57 public: | 57 public: |
| 58 BLINK_EXPORT static const double textSizeMultiplierRatio; | |
| 59 BLINK_EXPORT static const double minTextSizeMultiplier; | |
| 60 BLINK_EXPORT static const double maxTextSizeMultiplier; | |
| 61 | |
| 62 // Initialization ------------------------------------------------------ | 58 // Initialization ------------------------------------------------------ |
| 63 | 59 |
| 64 // Creates a WebView that is NOT yet initialized. You will need to | 60 // Creates a WebView that is NOT yet initialized. You will need to |
| 65 // call setMainFrame to finish the initialization. It is valid | 61 // call setMainFrame to finish the initialization. It is valid |
| 66 // to pass a null client pointer. | 62 // to pass a null client pointer. |
| 67 BLINK_EXPORT static WebView* create(WebViewClient*); | 63 BLINK_EXPORT static WebView* create(WebViewClient*); |
| 68 | 64 |
| 69 // After creating a WebView, you should immediately call this method. | 65 // After creating a WebView, you should immediately call this method. |
| 70 // You can optionally modify the settings before calling this method. | 66 // You can optionally modify the settings before calling this method. |
| 71 // This WebFrame will receive events for the main frame and must not | 67 // This WebFrame will receive events for the main frame and must not |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 virtual void clearFocusedElement() = 0; | 139 virtual void clearFocusedElement() = 0; |
| 144 | 140 |
| 145 // Scrolls the node currently in focus into |rect|, where |rect| is in | 141 // Scrolls the node currently in focus into |rect|, where |rect| is in |
| 146 // window space. | 142 // window space. |
| 147 virtual void scrollFocusedNodeIntoRect(const WebRect&) { } | 143 virtual void scrollFocusedNodeIntoRect(const WebRect&) { } |
| 148 | 144 |
| 149 // Advance the focus of the WebView forward to the next element or to the | 145 // Advance the focus of the WebView forward to the next element or to the |
| 150 // previous element in the tab sequence (if reverse is true). | 146 // previous element in the tab sequence (if reverse is true). |
| 151 virtual void advanceFocus(bool reverse) { } | 147 virtual void advanceFocus(bool reverse) { } |
| 152 | 148 |
| 153 // Animate a scale into the specified find-in-page rect. | |
| 154 virtual void zoomToFindInPageRect(const WebRect&) = 0; | |
| 155 | |
| 156 // Animate a scale into the specified rect where multiple targets were | |
| 157 // found from previous tap gesture. | |
| 158 // Returns false if it doesn't do any zooming. | |
| 159 virtual bool zoomToMultipleTargetsRect(const WebRect&) = 0; | |
| 160 | |
| 161 | 149 |
| 162 // Zoom ---------------------------------------------------------------- | 150 // Zoom ---------------------------------------------------------------- |
| 163 | 151 |
| 164 // TODO: Reevaluate if this is needed once all users are converted to using
the | 152 // TODO: Reevaluate if this is needed once all users are converted to using
the |
| 165 // virtual viewport pinch model. | 153 // virtual viewport pinch model. |
| 166 // Temporary to keep old style pinch viewport working while we gradually bri
ng up | 154 // Temporary to keep old style pinch viewport working while we gradually bri
ng up |
| 167 // virtual viewport pinch. | 155 // virtual viewport pinch. |
| 168 virtual void setMainFrameScrollOffset(const WebPoint& origin) = 0; | 156 virtual void setMainFrameScrollOffset(const WebPoint& origin) = 0; |
| 169 | 157 |
| 170 // Reset any saved values for the scroll and scale state. | 158 // Reset any saved values for the scroll and scale state. |
| 171 virtual void resetScrollAndScaleState() = 0; | 159 virtual void resetScrollAndScaleState() = 0; |
| 172 | 160 |
| 173 // Returns the "preferred" contents size, defined as the preferred minimum w
idth of the main document's contents | 161 // Returns the "preferred" contents size, defined as the preferred minimum w
idth of the main document's contents |
| 174 // and the minimum height required to display the main document without scro
llbars. | 162 // and the minimum height required to display the main document without scro
llbars. |
| 175 // The returned size has the page zoom factor applied. | |
| 176 virtual WebSize contentsPreferredMinimumSize() = 0; | 163 virtual WebSize contentsPreferredMinimumSize() = 0; |
| 177 | 164 |
| 178 // The ratio of the current device's screen DPI to the target device's scree
n DPI. | 165 // The ratio of the current device's screen DPI to the target device's scree
n DPI. |
| 179 virtual float deviceScaleFactor() const = 0; | 166 virtual float deviceScaleFactor() const = 0; |
| 180 | 167 |
| 181 // Sets the ratio as computed by computePageScaleConstraints. | 168 // Sets the ratio as computed by computePageScaleConstraints. |
| 182 virtual void setDeviceScaleFactor(float) = 0; | 169 virtual void setDeviceScaleFactor(float) = 0; |
| 183 | 170 |
| 184 | 171 |
| 185 // Fixed Layout -------------------------------------------------------- | 172 // Fixed Layout -------------------------------------------------------- |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 249 |
| 263 // Testing functionality for TestRunner --------------------------------- | 250 // Testing functionality for TestRunner --------------------------------- |
| 264 | 251 |
| 265 protected: | 252 protected: |
| 266 ~WebView() {} | 253 ~WebView() {} |
| 267 }; | 254 }; |
| 268 | 255 |
| 269 } // namespace blink | 256 } // namespace blink |
| 270 | 257 |
| 271 #endif | 258 #endif |
| OLD | NEW |