| 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 | 12 |
| 12 namespace blink { | 13 namespace blink { |
| 13 class WebInputEvent; | 14 class WebInputEvent; |
| 14 class WebLocalFrame; | 15 enum class WebClientRedirectPolicy; |
| 15 class WebRemoteFrame; | 16 enum class WebFrameLoadType; |
| 16 struct WebRect; | 17 struct WebRect; |
| 17 | 18 |
| 18 class WebRemoteFrameClient { | 19 class WebRemoteFrameClient { |
| 19 public: | 20 public: |
| 20 // Specifies the reason for the detachment. | 21 // Specifies the reason for the detachment. |
| 21 enum class DetachType { Remove, Swap }; | 22 enum class DetachType { Remove, Swap }; |
| 22 | 23 |
| 23 // Notify the embedder that it should remove this frame from the frame tree | 24 // Notify the embedder that it should remove this frame from the frame tree |
| 24 // and release any resources associated with it. | 25 // and release any resources associated with it. |
| 25 virtual void frameDetached(DetachType) { } | 26 virtual void frameDetached(DetachType) { } |
| 26 | 27 |
| 27 // Notifies the embedder that a postMessage was issued to a remote frame. | 28 // Notifies the embedder that a postMessage was issued to a remote frame. |
| 28 virtual void postMessageEvent( | 29 virtual void postMessageEvent( |
| 29 WebLocalFrame* sourceFrame, | 30 WebLocalFrame* sourceFrame, |
| 30 WebRemoteFrame* targetFrame, | 31 WebRemoteFrame* targetFrame, |
| 31 WebSecurityOrigin targetOrigin, | 32 WebSecurityOrigin targetOrigin, |
| 32 WebDOMMessageEvent) { } | 33 WebDOMMessageEvent) { } |
| 33 | 34 |
| 34 // Send initial drawing parameters to a child frame that is being rendered | 35 // Send initial drawing parameters to a child frame that is being rendered |
| 35 // out of process. | 36 // out of process. |
| 36 virtual void initializeChildFrame( | 37 virtual void initializeChildFrame( |
| 37 const WebRect& frameRect, | 38 const WebRect& frameRect, |
| 38 float deviceScaleFactor) { } | 39 float deviceScaleFactor) { } |
| 39 | 40 |
| 40 // A remote frame was asked to start a navigation. | 41 // A remote frame was asked to start a navigation. |
| 41 virtual void navigate(const WebURLRequest& request, bool shouldReplaceCurren
tEntry) { } | 42 virtual void navigate(const WebURLRequest& request, bool shouldReplaceCurren
tEntry) { } |
| 42 virtual void reload(bool ignoreCache, bool isClientRedirect) { } | 43 virtual void reload(WebFrameLoadType, WebClientRedirectPolicy) {} |
| 43 | 44 |
| 44 // FIXME: Remove this method once we have input routing in the browser | 45 // FIXME: Remove this method once we have input routing in the browser |
| 45 // process. See http://crbug.com/339659. | 46 // process. See http://crbug.com/339659. |
| 46 virtual void forwardInputEvent(const WebInputEvent*) { } | 47 virtual void forwardInputEvent(const WebInputEvent*) { } |
| 47 | 48 |
| 48 virtual void frameRectsChanged(const WebRect&) { } | 49 virtual void frameRectsChanged(const WebRect&) { } |
| 49 | 50 |
| 50 virtual void visibilityChanged(bool visible) {} | 51 virtual void visibilityChanged(bool visible) {} |
| 51 | 52 |
| 52 // This frame updated its opener to another frame. | 53 // This frame updated its opener to another frame. |
| 53 virtual void didChangeOpener(WebFrame* opener) { } | 54 virtual void didChangeOpener(WebFrame* opener) { } |
| 54 | 55 |
| 55 // Continue sequential focus navigation in this frame. This is called when | 56 // Continue sequential focus navigation in this frame. This is called when |
| 56 // the |source| frame is searching for the next focusable element (e.g., in | 57 // the |source| frame is searching for the next focusable element (e.g., in |
| 57 // response to <tab>) and encounters a remote frame. | 58 // response to <tab>) and encounters a remote frame. |
| 58 virtual void advanceFocus(WebFocusType type, WebLocalFrame* source) { } | 59 virtual void advanceFocus(WebFocusType type, WebLocalFrame* source) { } |
| 59 | 60 |
| 60 // This frame was focused by another frame. | 61 // This frame was focused by another frame. |
| 61 virtual void frameFocused() { } | 62 virtual void frameFocused() { } |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 } // namespace blink | 65 } // namespace blink |
| 65 | 66 |
| 66 #endif // WebRemoteFrameClient_h | 67 #endif // WebRemoteFrameClient_h |
| OLD | NEW |