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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, | 53 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, |
54 WebView*, | 54 WebView*, |
55 WebLocalFrame* mainFrame); | 55 WebLocalFrame* mainFrame); |
56 | 56 |
57 // Sets the visibility of the WebFrameWidget. | 57 // Sets the visibility of the WebFrameWidget. |
58 // We still track page-level visibility, but additionally we need to notify a | 58 // We still track page-level visibility, but additionally we need to notify a |
59 // WebFrameWidget when its owning RenderWidget receives a Show or Hide | 59 // WebFrameWidget when its owning RenderWidget receives a Show or Hide |
60 // directive, so that it knows whether it needs to draw or not. | 60 // directive, so that it knows whether it needs to draw or not. |
61 virtual void setVisibilityState(WebPageVisibilityState visibilityState) {} | 61 virtual void setVisibilityState(WebPageVisibilityState visibilityState) {} |
62 | 62 |
63 // Makes the WebFrameWidget transparent. This is useful if you want to have | 63 // Overrides the WebFrameWidget's background and base background color. You |
64 // some custom background rendered behind it. | 64 // can use this to enforce a transparent background, which is useful if you |
65 virtual bool isTransparent() const = 0; | 65 // want to have some custom background rendered behind the widget. |
66 virtual void setIsTransparent(bool) = 0; | 66 virtual void setBackgroundColorOverride(WebColor) = 0; |
| 67 virtual void clearBackgroundColorOverride() = 0; |
| 68 virtual void setBaseBackgroundColorOverride(WebColor) = 0; |
| 69 virtual void clearBaseBackgroundColorOverride() = 0; |
67 | 70 |
68 // Sets the base color used for this WebFrameWidget's background. This is in | 71 // Sets the base color used for this WebFrameWidget's background. This is in |
69 // effect the default background color used for pages with no | 72 // effect the default background color used for pages with no |
70 // background-color style in effect, or used as the alpha-blended basis for | 73 // background-color style in effect, or used as the alpha-blended basis for |
71 // any pages with translucent background-color style. (For pages with opaque | 74 // any pages with translucent background-color style. (For pages with opaque |
72 // background-color style, this property is effectively ignored). | 75 // background-color style, this property is effectively ignored). |
73 // Setting this takes effect for the currently loaded page, if any, and | 76 // Setting this takes effect for the currently loaded page, if any, and |
74 // persists across subsequent navigations. Defaults to white prior to the | 77 // persists across subsequent navigations. Defaults to white prior to the |
75 // first call to this method. | 78 // first call to this method. |
76 virtual void setBaseBackgroundColor(WebColor) = 0; | 79 virtual void setBaseBackgroundColor(WebColor) = 0; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 122 |
120 // Constrains the viewport intersection for use by IntersectionObserver. | 123 // Constrains the viewport intersection for use by IntersectionObserver. |
121 // This is needed for out-of-process iframes to know if they are clipped | 124 // This is needed for out-of-process iframes to know if they are clipped |
122 // by ancestor frames in another process. | 125 // by ancestor frames in another process. |
123 virtual void setRemoteViewportIntersection(const WebRect&) {} | 126 virtual void setRemoteViewportIntersection(const WebRect&) {} |
124 }; | 127 }; |
125 | 128 |
126 } // namespace blink | 129 } // namespace blink |
127 | 130 |
128 #endif | 131 #endif |
OLD | NEW |