| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 23 matching lines...) Expand all Loading... |
| 34 #include "../platform/WebColor.h" | 34 #include "../platform/WebColor.h" |
| 35 #include "WebFrame.h" | 35 #include "WebFrame.h" |
| 36 #include "WebNavigationPolicy.h" | 36 #include "WebNavigationPolicy.h" |
| 37 #include "WebNavigationType.h" | 37 #include "WebNavigationType.h" |
| 38 #include "WebTextDirection.h" | 38 #include "WebTextDirection.h" |
| 39 #include "public/platform/WebCommon.h" | 39 #include "public/platform/WebCommon.h" |
| 40 #include "public/platform/WebURLError.h" | 40 #include "public/platform/WebURLError.h" |
| 41 #include "public/platform/WebURLRequest.h" | 41 #include "public/platform/WebURLRequest.h" |
| 42 #include <v8.h> | 42 #include <v8.h> |
| 43 | 43 |
| 44 namespace mojo { |
| 45 class View; |
| 46 } |
| 47 |
| 44 namespace blink { | 48 namespace blink { |
| 45 | 49 |
| 46 class WebCachedURLRequest; | 50 class WebCachedURLRequest; |
| 47 class WebInputEvent; | 51 class WebInputEvent; |
| 48 class WebNode; | 52 class WebNode; |
| 49 class WebString; | 53 class WebString; |
| 50 class WebURL; | 54 class WebURL; |
| 51 class WebURLLoader; | 55 class WebURLLoader; |
| 52 class WebURLResponse; | 56 class WebURLResponse; |
| 53 struct WebConsoleMessage; | 57 struct WebConsoleMessage; |
| 54 struct WebRect; | 58 struct WebRect; |
| 55 struct WebSize; | 59 struct WebSize; |
| 56 struct WebURLError; | 60 struct WebURLError; |
| 57 | 61 |
| 58 class WebFrameClient { | 62 class WebFrameClient { |
| 59 public: | 63 public: |
| 60 // General notifications ----------------------------------------------- | 64 // General notifications ----------------------------------------------- |
| 61 | 65 |
| 62 // A child frame was created in this frame. This is called when the frame | 66 // A child frame was created in this frame. This is called when the frame |
| 63 // is created and initialized. Takes the name of the new frame, the parent | 67 // is created and initialized. Takes the name of the new frame, the parent |
| 64 // frame and returns a new WebFrame. The WebFrame is considered in-use | 68 // frame and returns a new WebFrame. The WebFrame is considered in-use |
| 65 // until frameDetached() is called on it. | 69 // until frameDetached() is called on it. |
| 66 // Note: If you override this, you should almost certainly be overriding | 70 // Note: If you override this, you should almost certainly be overriding |
| 67 // frameDetached(). | 71 // frameDetached(). |
| 68 virtual WebFrame* createChildFrame(WebLocalFrame* parent, const WebString& f
rameName) { return 0; } | 72 virtual mojo::View* createChildFrame(const WebURL& url) { return nullptr; } |
| 69 | |
| 70 virtual void createChildView(const WebURL& url) { } | |
| 71 | 73 |
| 72 // This frame has been detached from the view, but has not been closed yet. | 74 // This frame has been detached from the view, but has not been closed yet. |
| 75 // TODO(mpcomplete): reuse these. |
| 73 virtual void frameDetached(WebFrame*) { } | 76 virtual void frameDetached(WebFrame*) { } |
| 74 | 77 |
| 75 // This frame has become focused.. | 78 // This frame has become focused.. |
| 76 virtual void frameFocused() { } | 79 virtual void frameFocused() { } |
| 77 | 80 |
| 78 // This frame is about to be closed. This is called after frameDetached, | 81 // This frame is about to be closed. This is called after frameDetached, |
| 79 // when the document is being unloaded, due to new one committing. | 82 // when the document is being unloaded, due to new one committing. |
| 80 virtual void willClose(WebFrame*) { } | 83 virtual void willClose(WebFrame*) { } |
| 81 | 84 |
| 82 // FIXME(sky): remove. | 85 // FIXME(sky): remove. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 235 |
| 233 // Notifies the client that a WebGL context was lost on this page with the | 236 // Notifies the client that a WebGL context was lost on this page with the |
| 234 // given reason (one of the GL_ARB_robustness status codes; see | 237 // given reason (one of the GL_ARB_robustness status codes; see |
| 235 // Extensions3D.h in WebCore/platform/graphics). | 238 // Extensions3D.h in WebCore/platform/graphics). |
| 236 virtual void didLoseWebGLContext(WebLocalFrame*, int) { } | 239 virtual void didLoseWebGLContext(WebLocalFrame*, int) { } |
| 237 | 240 |
| 238 // FIXME: Remove this method once we have input routing in the browser | 241 // FIXME: Remove this method once we have input routing in the browser |
| 239 // process. See http://crbug.com/339659. | 242 // process. See http://crbug.com/339659. |
| 240 virtual void forwardInputEvent(const WebInputEvent*) { } | 243 virtual void forwardInputEvent(const WebInputEvent*) { } |
| 241 | 244 |
| 242 // Send initial drawing parameters to a child frame that is being rendered o
ut of process. | |
| 243 virtual void initializeChildFrame(const WebRect& frameRect, float scaleFacto
r) { } | |
| 244 | |
| 245 protected: | 245 protected: |
| 246 virtual ~WebFrameClient() { } | 246 virtual ~WebFrameClient() { } |
| 247 }; | 247 }; |
| 248 | 248 |
| 249 } // namespace blink | 249 } // namespace blink |
| 250 | 250 |
| 251 #endif | 251 #endif |
| OLD | NEW |