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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*)
; | 47 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*)
; |
48 // Creates a frame widget for a WebView. Temporary helper to help transition | 48 // Creates a frame widget for a WebView. Temporary helper to help transition |
49 // away from WebView inheriting WebWidget. | 49 // away from WebView inheriting WebWidget. |
50 // TODO(dcheng): Remove once transition is complete. | 50 // TODO(dcheng): Remove once transition is complete. |
51 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebView*, WebLo
calFrame* mainFrame); | 51 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebView*, WebLo
calFrame* mainFrame); |
52 | 52 |
53 // Sets the visibility of the WebFrameWidget. | 53 // Sets the visibility of the WebFrameWidget. |
54 // We still track page-level visibility, but additionally we need to notify
a WebFrameWidget | 54 // We still track page-level visibility, but additionally we need to notify
a WebFrameWidget |
55 // when its owning RenderWidget receives a Show or Hide directive, so that i
t knows whether | 55 // when its owning RenderWidget receives a Show or Hide directive, so that i
t knows whether |
56 // it needs to draw or not. | 56 // it needs to draw or not. |
57 virtual void setVisibilityState(WebPageVisibilityState visibilityState, bool
isInitialState) { } | 57 virtual void setVisibilityState(WebPageVisibilityState visibilityState) {} |
58 | 58 |
59 // Makes the WebFrameWidget transparent. This is useful if you want to have | 59 // Makes the WebFrameWidget transparent. This is useful if you want to have |
60 // some custom background rendered behind it. | 60 // some custom background rendered behind it. |
61 virtual bool isTransparent() const = 0; | 61 virtual bool isTransparent() const = 0; |
62 virtual void setIsTransparent(bool) = 0; | 62 virtual void setIsTransparent(bool) = 0; |
63 | 63 |
64 // Sets the base color used for this WebFrameWidget's background. This is in | 64 // Sets the base color used for this WebFrameWidget's background. This is in |
65 // effect the default background color used for pages with no | 65 // effect the default background color used for pages with no |
66 // background-color style in effect, or used as the alpha-blended basis for | 66 // 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 | 67 // any pages with translucent background-color style. (For pages with opaque |
68 // background-color style, this property is effectively ignored). | 68 // background-color style, this property is effectively ignored). |
69 // Setting this takes effect for the currently loaded page, if any, and | 69 // Setting this takes effect for the currently loaded page, if any, and |
70 // persists across subsequent navigations. Defaults to white prior to the | 70 // persists across subsequent navigations. Defaults to white prior to the |
71 // first call to this method. | 71 // first call to this method. |
72 virtual void setBaseBackgroundColor(WebColor) = 0; | 72 virtual void setBaseBackgroundColor(WebColor) = 0; |
73 | 73 |
74 // TODO(dcheng): Temporary: there should only be one WebFrameWidget | 74 // TODO(dcheng): Temporary: there should only be one WebFrameWidget |
75 // implementation but the Blink API is currently in a transition state. | 75 // implementation but the Blink API is currently in a transition state. |
76 // See https://goo.gl/7yVrnb. These methods should only be used inside | 76 // See https://goo.gl/7yVrnb. These methods should only be used inside |
77 // blink. | 77 // blink. |
78 virtual bool forSubframe() const { return true; } | 78 virtual bool forSubframe() const { return true; } |
79 virtual void scheduleAnimation() = 0; | 79 virtual void scheduleAnimation() = 0; |
80 virtual CompositorProxyClient* createCompositorProxyClient() = 0; | 80 virtual CompositorProxyClient* createCompositorProxyClient() = 0; |
81 virtual WebWidgetClient* client() const = 0; | 81 virtual WebWidgetClient* client() const = 0; |
82 }; | 82 }; |
83 | 83 |
84 } // namespace blink | 84 } // namespace blink |
85 | 85 |
86 #endif | 86 #endif |
OLD | NEW |