| 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 // Associates a content security policy with an isolated world. This policy | 279 // Associates a content security policy with an isolated world. This policy |
| 280 // should be used when evaluating script in the isolated world, and should | 280 // should be used when evaluating script in the isolated world, and should |
| 281 // also replace a protected resource's CSP when evaluating resources | 281 // also replace a protected resource's CSP when evaluating resources |
| 282 // injected into the DOM. | 282 // injected into the DOM. |
| 283 // | 283 // |
| 284 // FIXME: Setting this simply bypasses the protected resource's CSP. It | 284 // FIXME: Setting this simply bypasses the protected resource's CSP. It |
| 285 // doesn't yet restrict the isolated world to the provided policy. | 285 // doesn't yet restrict the isolated world to the provided policy. |
| 286 virtual void setIsolatedWorldContentSecurityPolicy( | 286 virtual void setIsolatedWorldContentSecurityPolicy( |
| 287 int worldID, const WebString&) = 0; | 287 int worldID, const WebString&) = 0; |
| 288 | 288 |
| 289 // Associates an isolated world with human-readable name which is useful for | |
| 290 // extension debugging. | |
| 291 virtual void setIsolatedWorldHumanReadableName( | |
| 292 int worldID, const WebString&) = 0; | |
| 293 | |
| 294 // Logs to the console associated with this frame. | 289 // Logs to the console associated with this frame. |
| 295 virtual void addMessageToConsole(const WebConsoleMessage&) = 0; | 290 virtual void addMessageToConsole(const WebConsoleMessage&) = 0; |
| 296 | 291 |
| 297 // Calls window.gc() if it is defined. | 292 // Calls window.gc() if it is defined. |
| 298 virtual void collectGarbage() = 0; | 293 virtual void collectGarbage() = 0; |
| 299 | 294 |
| 300 // Check if the scripting URL represents a mixed content condition relative | 295 // Check if the scripting URL represents a mixed content condition relative |
| 301 // to this frame. | 296 // to this frame. |
| 302 virtual bool checkIfRunInsecureContent(const WebURL&) const = 0; | 297 virtual bool checkIfRunInsecureContent(const WebURL&) const = 0; |
| 303 | 298 |
| 304 // Executes script in the context of the current page and returns the value | 299 // Executes script in the context of the current page and returns the value |
| 305 // that the script evaluated to. | 300 // that the script evaluated to. |
| 306 virtual v8::Handle<v8::Value> executeScriptAndReturnValue( | 301 virtual v8::Handle<v8::Value> executeScriptAndReturnValue( |
| 307 const WebScriptSource&) = 0; | 302 const WebScriptSource&) = 0; |
| 308 | 303 |
| 309 // ONLY FOR TESTS: Same as above but sets a fake UserGestureIndicator before | |
| 310 // execution. | |
| 311 virtual v8::Handle<v8::Value> executeScriptAndReturnValueForTests( | |
| 312 const WebScriptSource&); | |
| 313 | |
| 314 // worldID must be > 0 (as 0 represents the main world). | 304 // worldID must be > 0 (as 0 represents the main world). |
| 315 // worldID must be < EmbedderWorldIdLimit, high number used internally. | 305 // worldID must be < EmbedderWorldIdLimit, high number used internally. |
| 316 virtual void executeScriptInIsolatedWorld( | 306 virtual void executeScriptInIsolatedWorld( |
| 317 int worldID, const WebScriptSource* sourcesIn, unsigned numSources, | 307 int worldID, const WebScriptSource* sourcesIn, unsigned numSources, |
| 318 int extensionGroup, WebVector<v8::Local<v8::Value> >* results) = 0; | 308 int extensionGroup, WebVector<v8::Local<v8::Value> >* results) = 0; |
| 319 | 309 |
| 320 // Call the function with the given receiver and arguments, bypassing | 310 // Call the function with the given receiver and arguments, bypassing |
| 321 // canExecute(). | 311 // canExecute(). |
| 322 virtual v8::Handle<v8::Value> callFunctionEvenIfScriptDisabled( | 312 virtual v8::Handle<v8::Value> callFunctionEvenIfScriptDisabled( |
| 323 v8::Handle<v8::Function>, | 313 v8::Handle<v8::Function>, |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 // This method should be called only on the main frame. | 598 // This method should be called only on the main frame. |
| 609 virtual int selectNearestFindMatch(const WebFloatPoint&, | 599 virtual int selectNearestFindMatch(const WebFloatPoint&, |
| 610 WebRect* selectionRect) = 0; | 600 WebRect* selectionRect) = 0; |
| 611 | 601 |
| 612 | 602 |
| 613 // Set the tickmarks for the frame. This will override the default tickmarks | 603 // Set the tickmarks for the frame. This will override the default tickmarks |
| 614 // generated by find results. If this is called with an empty array, the | 604 // generated by find results. If this is called with an empty array, the |
| 615 // default behavior will be restored. | 605 // default behavior will be restored. |
| 616 virtual void setTickmarks(const WebVector<WebRect>&) = 0; | 606 virtual void setTickmarks(const WebVector<WebRect>&) = 0; |
| 617 | 607 |
| 618 // OrientationChange event --------------------------------------------- | |
| 619 | |
| 620 // Notify the frame that the screen orientation has changed. | |
| 621 virtual void sendOrientationChangeEvent() = 0; | |
| 622 | |
| 623 // FIXME: this is only there for backward compatibility, it will be removed. | |
| 624 // Orientation is the interface orientation in degrees. | |
| 625 // Some examples are: | |
| 626 // 0 is straight up; -90 is when the device is rotated 90 clockwise; | |
| 627 // 90 is when rotated counter clockwise. | |
| 628 void sendOrientationChangeEvent(int orientation) | |
| 629 { | |
| 630 sendOrientationChangeEvent(); | |
| 631 } | |
| 632 | |
| 633 // Events -------------------------------------------------------------- | 608 // Events -------------------------------------------------------------- |
| 634 | 609 |
| 635 // Dispatches a message event on the current DOMWindow in this WebFrame. | 610 // Dispatches a message event on the current DOMWindow in this WebFrame. |
| 636 virtual void dispatchMessageEventWithOriginCheck( | 611 virtual void dispatchMessageEventWithOriginCheck( |
| 637 const WebSecurityOrigin& intendedTargetOrigin, | 612 const WebSecurityOrigin& intendedTargetOrigin, |
| 638 const WebDOMEvent&) = 0; | 613 const WebDOMEvent&) = 0; |
| 639 | 614 |
| 640 | 615 |
| 641 // Utility ------------------------------------------------------------- | 616 // Utility ------------------------------------------------------------- |
| 642 | 617 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; | 676 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; |
| 702 }; | 677 }; |
| 703 | 678 |
| 704 #if BLINK_IMPLEMENTATION | 679 #if BLINK_IMPLEMENTATION |
| 705 Frame* toCoreFrame(const WebFrame*); | 680 Frame* toCoreFrame(const WebFrame*); |
| 706 #endif | 681 #endif |
| 707 | 682 |
| 708 } // namespace blink | 683 } // namespace blink |
| 709 | 684 |
| 710 #endif | 685 #endif |
| OLD | NEW |