| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 331 |
| 332 // Navigation ---------------------------------------------------------- | 332 // Navigation ---------------------------------------------------------- |
| 333 // TODO(clamy): Remove the reload, reloadWithOverrideURL, and loadRequest | 333 // TODO(clamy): Remove the reload, reloadWithOverrideURL, and loadRequest |
| 334 // functions once RenderFrame only calls WebLoadFrame::load. | 334 // functions once RenderFrame only calls WebLoadFrame::load. |
| 335 | 335 |
| 336 // Reload the current document. | 336 // Reload the current document. |
| 337 // Note: reload() and reloadWithOverrideURL() will be deprecated. | 337 // Note: reload() and reloadWithOverrideURL() will be deprecated. |
| 338 // Do not use these APIs any more, but use loadRequest() instead. | 338 // Do not use these APIs any more, but use loadRequest() instead. |
| 339 virtual void reload(WebFrameLoadType = WebFrameLoadType::Reload) = 0; | 339 virtual void reload(WebFrameLoadType = WebFrameLoadType::Reload) = 0; |
| 340 | 340 |
| 341 // This is used for situations where we want to reload a different URL because
of a redirect. | 341 // This is used for situations where we want to reload a different URL because |
| 342 // of a redirect. |
| 342 virtual void reloadWithOverrideURL( | 343 virtual void reloadWithOverrideURL( |
| 343 const WebURL& overrideUrl, | 344 const WebURL& overrideUrl, |
| 344 WebFrameLoadType = WebFrameLoadType::Reload) = 0; | 345 WebFrameLoadType = WebFrameLoadType::Reload) = 0; |
| 345 | 346 |
| 346 // Load the given URL. | 347 // Load the given URL. |
| 347 virtual void loadRequest(const WebURLRequest&) = 0; | 348 virtual void loadRequest(const WebURLRequest&) = 0; |
| 348 | 349 |
| 349 // This method is short-hand for calling LoadData, where mime_type is | 350 // This method is short-hand for calling LoadData, where mime_type is |
| 350 // "text/html" and text_encoding is "UTF-8". | 351 // "text/html" and text_encoding is "UTF-8". |
| 351 virtual void loadHTMLString(const WebData& html, | 352 virtual void loadHTMLString(const WebData& html, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 382 | 383 |
| 383 // Returns a WebURLLoader that is associated with this frame. The loader | 384 // Returns a WebURLLoader that is associated with this frame. The loader |
| 384 // will, for example, be cancelled when WebFrame::stopLoading is called. | 385 // will, for example, be cancelled when WebFrame::stopLoading is called. |
| 385 // FIXME: stopLoading does not yet cancel an associated loader!! | 386 // FIXME: stopLoading does not yet cancel an associated loader!! |
| 386 virtual WebURLLoader* createAssociatedURLLoader( | 387 virtual WebURLLoader* createAssociatedURLLoader( |
| 387 const WebURLLoaderOptions& = WebURLLoaderOptions()) = 0; | 388 const WebURLLoaderOptions& = WebURLLoaderOptions()) = 0; |
| 388 | 389 |
| 389 // Returns the number of registered unload listeners. | 390 // Returns the number of registered unload listeners. |
| 390 virtual unsigned unloadListenerCount() const = 0; | 391 virtual unsigned unloadListenerCount() const = 0; |
| 391 | 392 |
| 392 // Will return true if between didStartLoading and didStopLoading notification
s. | 393 // Will return true if between didStartLoading and didStopLoading |
| 394 // notifications. |
| 393 virtual bool isLoading() const; | 395 virtual bool isLoading() const; |
| 394 | 396 |
| 395 // Printing ------------------------------------------------------------ | 397 // Printing ------------------------------------------------------------ |
| 396 | 398 |
| 397 // Reformats the WebFrame for printing. WebPrintParams specifies the printable | 399 // Reformats the WebFrame for printing. WebPrintParams specifies the printable |
| 398 // content size, paper size, printable area size, printer DPI and print | 400 // content size, paper size, printable area size, printer DPI and print |
| 399 // scaling option. If constrainToNode node is specified, then only the given n
ode | 401 // scaling option. If constrainToNode node is specified, then only the given |
| 400 // is printed (for now only plugins are supported), instead of the entire fram
e. | 402 // node is printed (for now only plugins are supported), instead of the entire |
| 403 // frame. |
| 401 // Returns the number of pages that can be printed at the given | 404 // Returns the number of pages that can be printed at the given |
| 402 // page size. | 405 // page size. |
| 403 virtual int printBegin(const WebPrintParams&, | 406 virtual int printBegin(const WebPrintParams&, |
| 404 const WebNode& constrainToNode = WebNode()) = 0; | 407 const WebNode& constrainToNode = WebNode()) = 0; |
| 405 | 408 |
| 406 // Returns the page shrinking factor calculated by webkit (usually | 409 // Returns the page shrinking factor calculated by webkit (usually |
| 407 // between 1/1.33 and 1/2). Returns 0 if the page number is invalid or | 410 // between 1/1.33 and 1/2). Returns 0 if the page number is invalid or |
| 408 // not in printing mode. | 411 // not in printing mode. |
| 409 virtual float getPrintPageShrink(int page) = 0; | 412 virtual float getPrintPageShrink(int page) = 0; |
| 410 | 413 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 434 // one pixel wide blue lines. This method exists to support layout tests. | 437 // one pixel wide blue lines. This method exists to support layout tests. |
| 435 virtual void printPagesWithBoundaries(WebCanvas*, const WebSize&) = 0; | 438 virtual void printPagesWithBoundaries(WebCanvas*, const WebSize&) = 0; |
| 436 | 439 |
| 437 // Returns the bounds rect for current selection. If selection is performed | 440 // Returns the bounds rect for current selection. If selection is performed |
| 438 // on transformed text, the rect will still bound the selection but will | 441 // on transformed text, the rect will still bound the selection but will |
| 439 // not be transformed itself. If no selection is present, the rect will be | 442 // not be transformed itself. If no selection is present, the rect will be |
| 440 // empty ((0,0), (0,0)). | 443 // empty ((0,0), (0,0)). |
| 441 virtual WebRect selectionBoundsRect() const = 0; | 444 virtual WebRect selectionBoundsRect() const = 0; |
| 442 | 445 |
| 443 // Only for testing purpose: | 446 // Only for testing purpose: |
| 444 // Returns true if selection.anchorNode has a marker on range from |from| with
|length|. | 447 // Returns true if selection.anchorNode has a marker on range from |from| with |
| 448 // |length|. |
| 445 virtual bool selectionStartHasSpellingMarkerFor(int from, | 449 virtual bool selectionStartHasSpellingMarkerFor(int from, |
| 446 int length) const = 0; | 450 int length) const = 0; |
| 447 | 451 |
| 448 // Dumps the layer tree, used by the accelerated compositor, in | 452 // Dumps the layer tree, used by the accelerated compositor, in |
| 449 // text form. This is used only by layout tests. | 453 // text form. This is used only by layout tests. |
| 450 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; | 454 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; |
| 451 | 455 |
| 452 virtual WebFrameImplBase* toImplBase() = 0; | 456 virtual WebFrameImplBase* toImplBase() = 0; |
| 453 // TODO(dcheng): Fix const-correctness issues and remove this overload. | 457 // TODO(dcheng): Fix const-correctness issues and remove this overload. |
| 454 virtual const WebFrameImplBase* toImplBase() const { | 458 virtual const WebFrameImplBase* toImplBase() const { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 WebFrame* m_firstChild; | 508 WebFrame* m_firstChild; |
| 505 WebFrame* m_lastChild; | 509 WebFrame* m_lastChild; |
| 506 | 510 |
| 507 WebFrame* m_opener; | 511 WebFrame* m_opener; |
| 508 std::unique_ptr<OpenedFrameTracker> m_openedFrameTracker; | 512 std::unique_ptr<OpenedFrameTracker> m_openedFrameTracker; |
| 509 }; | 513 }; |
| 510 | 514 |
| 511 } // namespace blink | 515 } // namespace blink |
| 512 | 516 |
| 513 #endif | 517 #endif |
| OLD | NEW |