| 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/WebSecurityOrigin.h" | 8 #include "public/platform/WebSecurityOrigin.h" |
| 9 #include "public/web/WebDOMMessageEvent.h" | 9 #include "public/web/WebDOMMessageEvent.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 class WebInputEvent; | 12 class WebInputEvent; |
| 13 class WebLocalFrame; | 13 class WebLocalFrame; |
| 14 class WebRemoteFrame; | 14 class WebRemoteFrame; |
| 15 struct WebRect; | 15 struct WebRect; |
| 16 | 16 |
| 17 class WebRemoteFrameClient { | 17 class WebRemoteFrameClient { |
| 18 public: | 18 public: |
| 19 // Specifies the reason for the detachment. | 19 // Specifies the reason for the detachment. |
| 20 enum class DetachType { Remove, Swap }; | 20 enum class DetachType { Remove, Swap }; |
| 21 | 21 |
| 22 // Notify the embedder that it should remove this frame from the frame tree | 22 // Notify the embedder that it should remove this frame from the frame tree |
| 23 // and release any resources associated with it. | 23 // and release any resources associated with it. |
| 24 virtual void frameDetached(DetachType) { } | 24 virtual void frameDetached() { } |
| 25 | 25 |
| 26 // Notifies the embedder that a postMessage was issued to a remote frame. | 26 // Notifies the embedder that a postMessage was issued to a remote frame. |
| 27 virtual void postMessageEvent( | 27 virtual void postMessageEvent( |
| 28 WebLocalFrame* sourceFrame, | 28 WebLocalFrame* sourceFrame, |
| 29 WebRemoteFrame* targetFrame, | 29 WebRemoteFrame* targetFrame, |
| 30 WebSecurityOrigin targetOrigin, | 30 WebSecurityOrigin targetOrigin, |
| 31 WebDOMMessageEvent) { } | 31 WebDOMMessageEvent) { } |
| 32 | 32 |
| 33 // Send initial drawing parameters to a child frame that is being rendered | 33 // Send initial drawing parameters to a child frame that is being rendered |
| 34 // out of process. | 34 // out of process. |
| 35 virtual void initializeChildFrame( | 35 virtual void initializeChildFrame( |
| 36 const WebRect& frameRect, | 36 const WebRect& frameRect, |
| 37 float scaleFactor) { } | 37 float scaleFactor) { } |
| 38 | 38 |
| 39 // A remote frame was asked to start a navigation. | 39 // A remote frame was asked to start a navigation. |
| 40 virtual void navigate(const WebURLRequest& request, bool shouldReplaceCurren
tEntry) { } | 40 virtual void navigate(const WebURLRequest& request, bool shouldReplaceCurren
tEntry) { } |
| 41 virtual void reload(bool ignoreCache, bool isClientRedirect) { } | 41 virtual void reload(bool ignoreCache, bool isClientRedirect) { } |
| 42 | 42 |
| 43 // FIXME: Remove this method once we have input routing in the browser | 43 // FIXME: Remove this method once we have input routing in the browser |
| 44 // process. See http://crbug.com/339659. | 44 // process. See http://crbug.com/339659. |
| 45 virtual void forwardInputEvent(const WebInputEvent*) { } | 45 virtual void forwardInputEvent(const WebInputEvent*) { } |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 } // namespace blink | 48 } // namespace blink |
| 49 | 49 |
| 50 #endif // WebRemoteFrameClient_h | 50 #endif // WebRemoteFrameClient_h |
| OLD | NEW |