| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 class WebLocalFrame; | 40 class WebLocalFrame; |
| 41 class WebView; | 41 class WebView; |
| 42 class WebWidgetClient; | 42 class WebWidgetClient; |
| 43 | 43 |
| 44 class WebFrameWidget : public WebWidget { | 44 class WebFrameWidget : public WebWidget { |
| 45 public: | 45 public: |
| 46 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*)
; | 46 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*)
; |
| 47 // Creates a frame widget for a WebView. Temporary helper to help transition | 47 // Creates a frame widget for a WebView. Temporary helper to help transition |
| 48 // away from WebView inheriting WebWidget. | 48 // away from WebView inheriting WebWidget. |
| 49 BLINK_EXPORT static WebFrameWidget* create(WebView*); | 49 // TODO(dcheng): Remove once transition is complete. |
| 50 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebView*, WebLo
calFrame* mainFrame); |
| 50 | 51 |
| 51 // Sets the visibility of the WebFrameWidget. | 52 // Sets the visibility of the WebFrameWidget. |
| 52 // We still track page-level visibility, but additionally we need to notify
a WebFrameWidget | 53 // We still track page-level visibility, but additionally we need to notify
a WebFrameWidget |
| 53 // when its owning RenderWidget receives a Show or Hide directive, so that i
t knows whether | 54 // when its owning RenderWidget receives a Show or Hide directive, so that i
t knows whether |
| 54 // it needs to draw or not. | 55 // it needs to draw or not. |
| 55 virtual void setVisibilityState(WebPageVisibilityState visibilityState, bool
isInitialState) { } | 56 virtual void setVisibilityState(WebPageVisibilityState visibilityState, bool
isInitialState) { } |
| 56 | 57 |
| 57 // Temporary: there should only be one WebFrameWidget implementation but the | 58 // Temporary: there should only be one WebFrameWidget implementation but the |
| 58 // Blink API is currently in a transition state. See https://goo.gl/7yVrnb | 59 // Blink API is currently in a transition state. See https://goo.gl/7yVrnb |
| 59 virtual bool forSubframe() const { return true; } | 60 virtual bool forSubframe() const { return true; } |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 } // namespace blink | 63 } // namespace blink |
| 63 | 64 |
| 64 #endif | 65 #endif |
| OLD | NEW |