| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebRemoteFrameClient_h | 5 #ifndef WebRemoteFrameClient_h |
| 6 #define WebRemoteFrameClient_h | 6 #define WebRemoteFrameClient_h |
| 7 | 7 |
| 8 #include "public/platform/WebFocusType.h" | 8 #include "public/platform/WebFocusType.h" |
| 9 #include "public/platform/WebSecurityOrigin.h" | 9 #include "public/platform/WebSecurityOrigin.h" |
| 10 #include "public/web/WebDOMMessageEvent.h" | 10 #include "public/web/WebDOMMessageEvent.h" |
| 11 #include "public/web/WebFrame.h" | 11 #include "public/web/WebFrame.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 class WebInputEvent; | 14 class WebInputEvent; |
| 15 enum class WebClientRedirectPolicy; | 15 enum class WebClientRedirectPolicy; |
| 16 enum class WebFrameLoadType; | 16 enum class WebFrameLoadType; |
| 17 struct WebPoint; |
| 17 struct WebRect; | 18 struct WebRect; |
| 18 | 19 |
| 19 class WebRemoteFrameClient { | 20 class WebRemoteFrameClient { |
| 20 public: | 21 public: |
| 21 // Specifies the reason for the detachment. | 22 // Specifies the reason for the detachment. |
| 22 enum class DetachType { Remove, Swap }; | 23 enum class DetachType { Remove, Swap }; |
| 23 | 24 |
| 24 // Notify the embedder that it should remove this frame from the frame tree | 25 // Notify the embedder that it should remove this frame from the frame tree |
| 25 // and release any resources associated with it. | 26 // and release any resources associated with it. |
| 26 virtual void frameDetached(DetachType) {} | 27 virtual void frameDetached(DetachType) {} |
| 27 | 28 |
| 28 // Notifies the embedder that a postMessage was issued to a remote frame. | 29 // Notifies the embedder that a postMessage was issued to a remote frame. |
| 29 virtual void forwardPostMessage(WebLocalFrame* sourceFrame, | 30 virtual void forwardPostMessage(WebLocalFrame* sourceFrame, |
| 30 WebRemoteFrame* targetFrame, | 31 WebRemoteFrame* targetFrame, |
| 31 WebSecurityOrigin targetOrigin, | 32 WebSecurityOrigin targetOrigin, |
| 32 WebDOMMessageEvent) {} | 33 WebDOMMessageEvent) {} |
| 33 | 34 |
| 34 // A remote frame was asked to start a navigation. | 35 // A remote frame was asked to start a navigation. |
| 35 virtual void navigate(const WebURLRequest& request, | 36 virtual void navigate(const WebURLRequest& request, |
| 36 bool shouldReplaceCurrentEntry) {} | 37 bool shouldReplaceCurrentEntry) {} |
| 37 virtual void reload(WebFrameLoadType, WebClientRedirectPolicy) {} | 38 virtual void reload(WebFrameLoadType, WebClientRedirectPolicy) {} |
| 38 | 39 |
| 39 // FIXME: Remove this method once we have input routing in the browser | 40 // FIXME: Remove this method once we have input routing in the browser |
| 40 // process. See http://crbug.com/339659. | 41 // process. See http://crbug.com/339659. |
| 41 virtual void forwardInputEvent(const WebInputEvent*) {} | 42 virtual void forwardInputEvent(const WebInputEvent*) {} |
| 42 | 43 |
| 43 virtual void frameRectsChanged(const WebRect&) {} | 44 virtual void frameRectsChanged(const WebRect&) {} |
| 44 | 45 |
| 46 virtual void updateRemoteViewportIntersection( |
| 47 const WebRect& viewportIntersection, |
| 48 const WebPoint& rootOffset) {} |
| 49 |
| 45 virtual void visibilityChanged(bool visible) {} | 50 virtual void visibilityChanged(bool visible) {} |
| 46 | 51 |
| 47 // This frame updated its opener to another frame. | 52 // This frame updated its opener to another frame. |
| 48 virtual void didChangeOpener(WebFrame* opener) {} | 53 virtual void didChangeOpener(WebFrame* opener) {} |
| 49 | 54 |
| 50 // Continue sequential focus navigation in this frame. This is called when | 55 // Continue sequential focus navigation in this frame. This is called when |
| 51 // the |source| frame is searching for the next focusable element (e.g., in | 56 // the |source| frame is searching for the next focusable element (e.g., in |
| 52 // response to <tab>) and encounters a remote frame. | 57 // response to <tab>) and encounters a remote frame. |
| 53 virtual void advanceFocus(WebFocusType type, WebLocalFrame* source) {} | 58 virtual void advanceFocus(WebFocusType type, WebLocalFrame* source) {} |
| 54 | 59 |
| 55 // This frame was focused by another frame. | 60 // This frame was focused by another frame. |
| 56 virtual void frameFocused() {} | 61 virtual void frameFocused() {} |
| 57 }; | 62 }; |
| 58 | 63 |
| 59 } // namespace blink | 64 } // namespace blink |
| 60 | 65 |
| 61 #endif // WebRemoteFrameClient_h | 66 #endif // WebRemoteFrameClient_h |
| OLD | NEW |