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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // 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) {} |
57 | 57 |
58 // Makes the WebFrameWidget transparent. This is useful if you want to have | 58 // Makes the WebFrameWidget transparent. This is useful if you want to have |
59 // some custom background rendered behind it. | 59 // some custom background rendered behind it. |
60 virtual bool isTransparent() const = 0; | 60 virtual bool isTransparent() const = 0; |
61 virtual void setIsTransparent(bool) = 0; | 61 virtual void setIsTransparent(bool) = 0; |
62 | 62 |
63 // Sets the base color used for this WebFrameWidget's background. This is in | 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 | 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 | 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 | 66 // any pages with translucent background-color style. (For pages with opaque |
67 // background-color style, this property is effectively ignored). | 67 // background-color style, this property is effectively ignored). |
68 // Setting this takes effect for the currently loaded page, if any, and | 68 // Setting this takes effect for the currently loaded page, if any, and |
69 // persists across subsequent navigations. Defaults to white prior to the | 69 // persists across subsequent navigations. Defaults to white prior to the |
70 // first call to this method. | 70 // first call to this method. |
71 virtual void setBaseBackgroundColor(WebColor) = 0; | 71 virtual void setBaseBackgroundColor(WebColor) = 0; |
72 | 72 |
73 // TODO(dcheng): Temporary: there should only be one WebFrameWidget | 73 // TODO(dcheng): Temporary: there should only be one WebFrameWidget |
74 // implementation but the Blink API is currently in a transition state. | 74 // implementation but the Blink API is currently in a transition state. |
75 // See https://goo.gl/7yVrnb. These methods should only be used inside | 75 // See https://goo.gl/7yVrnb. These methods should only be used inside |
76 // blink. | 76 // blink. |
77 virtual bool forSubframe() const { return true; } | 77 virtual bool forSubframe() const { return true; } |
78 virtual void scheduleAnimation() = 0; | 78 virtual void scheduleAnimation() = 0; |
79 virtual WebWidgetClient* client() const = 0; | 79 virtual WebWidgetClient* client() const = 0; |
80 }; | 80 }; |
81 | 81 |
82 } // namespace blink | 82 } // namespace blink |
83 | 83 |
84 #endif | 84 #endif |
OLD | NEW |