Chromium Code Reviews| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 // away from WebView inheriting WebWidget. | 48 // away from WebView inheriting WebWidget. |
| 49 // TODO(dcheng): Remove once transition is complete. | 49 // TODO(dcheng): Remove once transition is complete. |
| 50 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebView*, WebLo calFrame* mainFrame); | 50 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebView*, WebLo calFrame* mainFrame); |
| 51 | 51 |
| 52 // Sets the visibility of the WebFrameWidget. | 52 // Sets the visibility of the WebFrameWidget. |
| 53 // 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 |
| 54 // 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 |
| 55 // it needs to draw or not. | 55 // it needs to draw or not. |
| 56 virtual void setVisibilityState(WebPageVisibilityState visibilityState, bool isInitialState) { } | 56 virtual void setVisibilityState(WebPageVisibilityState visibilityState, bool isInitialState) { } |
| 57 | 57 |
| 58 // Makes the WebFrameWidget transparent. This is useful if you want to have | |
| 59 // some custom background rendered behind it. | |
| 60 virtual bool isTransparent() const = 0; | |
| 61 virtual void setIsTransparent(bool) = 0; | |
| 62 | |
| 63 // Sets the base color used for this WebFrameWidget's background. This is in | |
| 64 // effect the default background color used for pages with no | |
| 65 // background-color style in effect, or used as the alpha-blended basis for | |
| 66 // any pages with translucent background-color style. (For pages with opaque | |
| 67 // background-color style, this property is effectively ignored). | |
| 68 // Setting this takes effect for the currently loaded page, if any, and | |
| 69 // persists across subsequent navigations. Defaults to white prior to the | |
| 70 // first call to this method. | |
| 71 virtual void setBaseBackgroundColor(WebColor) = 0; | |
| 72 | |
| 73 // Overrides the background color for this WebFrameWidget. | |
| 74 virtual void setBackgroundColorOverride(WebColor) = 0; | |
|
dcheng
2016/02/10 22:13:44
Does this need to be the in public layer? I don't
lfg
2016/02/10 23:20:24
If I remember correctly, when I did this I was pla
| |
| 75 virtual WebColor backgroundColorOverride() const = 0; | |
| 76 | |
| 58 // TODO(dcheng): Temporary: there should only be one WebFrameWidget | 77 // TODO(dcheng): Temporary: there should only be one WebFrameWidget |
| 59 // implementation but the Blink API is currently in a transition state. | 78 // implementation but the Blink API is currently in a transition state. |
| 60 // See https://goo.gl/7yVrnb. These methods should only be used inside | 79 // See https://goo.gl/7yVrnb. These methods should only be used inside |
| 61 // blink. | 80 // blink. |
| 62 virtual bool forSubframe() const { return true; } | 81 virtual bool forSubframe() const { return true; } |
| 63 virtual void scheduleAnimation() = 0; | 82 virtual void scheduleAnimation() = 0; |
| 64 }; | 83 }; |
| 65 | 84 |
| 66 } // namespace blink | 85 } // namespace blink |
| 67 | 86 |
| 68 #endif | 87 #endif |
| OLD | NEW |