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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #ifndef WebFrameWidget_h | 31 #ifndef WebFrameWidget_h |
32 #define WebFrameWidget_h | 32 #define WebFrameWidget_h |
33 | 33 |
34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
35 #include "../platform/WebPageVisibilityState.h" | 35 #include "../platform/WebPageVisibilityState.h" |
36 #include "public/web/WebWidget.h" | 36 #include "public/web/WebWidget.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
| 40 class CompositorAnimationTimeline; |
40 class CompositorProxyClient; | 41 class CompositorProxyClient; |
| 42 class GraphicsLayer; |
41 class WebLocalFrame; | 43 class WebLocalFrame; |
42 class WebView; | 44 class WebView; |
43 class WebWidgetClient; | 45 class WebWidgetClient; |
44 | 46 |
45 class WebFrameWidget : public WebWidget { | 47 class WebFrameWidget : public WebWidget { |
46 public: | 48 public: |
47 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*)
; | 49 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*)
; |
48 // Creates a frame widget for a WebView. Temporary helper to help transition | 50 // Creates a frame widget for a WebView. Temporary helper to help transition |
49 // away from WebView inheriting WebWidget. | 51 // away from WebView inheriting WebWidget. |
50 // TODO(dcheng): Remove once transition is complete. | 52 // TODO(dcheng): Remove once transition is complete. |
(...skipping 13 matching lines...) Expand all Loading... |
64 // Sets the base color used for this WebFrameWidget's background. This is in | 66 // Sets the base color used for this WebFrameWidget's background. This is in |
65 // effect the default background color used for pages with no | 67 // effect the default background color used for pages with no |
66 // background-color style in effect, or used as the alpha-blended basis for | 68 // background-color style in effect, or used as the alpha-blended basis for |
67 // any pages with translucent background-color style. (For pages with opaque | 69 // any pages with translucent background-color style. (For pages with opaque |
68 // background-color style, this property is effectively ignored). | 70 // background-color style, this property is effectively ignored). |
69 // Setting this takes effect for the currently loaded page, if any, and | 71 // Setting this takes effect for the currently loaded page, if any, and |
70 // persists across subsequent navigations. Defaults to white prior to the | 72 // persists across subsequent navigations. Defaults to white prior to the |
71 // first call to this method. | 73 // first call to this method. |
72 virtual void setBaseBackgroundColor(WebColor) = 0; | 74 virtual void setBaseBackgroundColor(WebColor) = 0; |
73 | 75 |
| 76 |
| 77 // Blink internal methods -------------------------------------------------- |
74 // TODO(dcheng): Temporary: there should only be one WebFrameWidget | 78 // TODO(dcheng): Temporary: there should only be one WebFrameWidget |
75 // implementation but the Blink API is currently in a transition state. | 79 // implementation but the Blink API is currently in a transition state. |
76 // See https://goo.gl/7yVrnb. These methods should only be used inside | 80 // See https://goo.gl/7yVrnb. These methods should only be used inside |
77 // blink. | 81 // blink. |
78 virtual bool forSubframe() const { return true; } | 82 virtual bool forSubframe() const { return true; } |
79 virtual void scheduleAnimation() = 0; | 83 virtual void scheduleAnimation() = 0; |
80 virtual CompositorProxyClient* createCompositorProxyClient() = 0; | 84 virtual CompositorProxyClient* createCompositorProxyClient() = 0; |
81 virtual WebWidgetClient* client() const = 0; | 85 virtual WebWidgetClient* client() const = 0; |
| 86 |
| 87 // Sets the root graphics layer. |GraphicsLayer| can be null when detaching |
| 88 // the root layer. |
| 89 virtual void setRootGraphicsLayer(GraphicsLayer*) = 0; |
| 90 |
| 91 // Attaches/detaches a CompositorAnimationTimeline to the layer tree. |
| 92 virtual void attachCompositorAnimationTimeline(CompositorAnimationTimeline*)
= 0; |
| 93 virtual void detachCompositorAnimationTimeline(CompositorAnimationTimeline*)
= 0; |
82 }; | 94 }; |
83 | 95 |
84 } // namespace blink | 96 } // namespace blink |
85 | 97 |
86 #endif | 98 #endif |
OLD | NEW |