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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 public: | 45 public: |
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*, | 50 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, |
51 WebView*, | 51 WebView*, |
52 WebLocalFrame* mainFrame); | 52 WebLocalFrame* mainFrame); |
53 | 53 |
54 // Sets the visibility of the WebFrameWidget. | 54 // Sets the visibility of the WebFrameWidget. |
55 // We still track page-level visibility, but additionally we need to notify a
WebFrameWidget | 55 // We still track page-level visibility, but additionally we need to notify a |
56 // when its owning RenderWidget receives a Show or Hide directive, so that it
knows whether | 56 // WebFrameWidget when its owning RenderWidget receives a Show or Hide |
57 // it needs to draw or not. | 57 // directive, so that it knows whether it needs to draw or not. |
58 virtual void setVisibilityState(WebPageVisibilityState visibilityState) {} | 58 virtual void setVisibilityState(WebPageVisibilityState visibilityState) {} |
59 | 59 |
60 // Makes the WebFrameWidget transparent. This is useful if you want to have | 60 // Makes the WebFrameWidget transparent. This is useful if you want to have |
61 // some custom background rendered behind it. | 61 // some custom background rendered behind it. |
62 virtual bool isTransparent() const = 0; | 62 virtual bool isTransparent() const = 0; |
63 virtual void setIsTransparent(bool) = 0; | 63 virtual void setIsTransparent(bool) = 0; |
64 | 64 |
65 // Sets the base color used for this WebFrameWidget's background. This is in | 65 // Sets the base color used for this WebFrameWidget's background. This is in |
66 // effect the default background color used for pages with no | 66 // effect the default background color used for pages with no |
67 // background-color style in effect, or used as the alpha-blended basis for | 67 // background-color style in effect, or used as the alpha-blended basis for |
68 // any pages with translucent background-color style. (For pages with opaque | 68 // any pages with translucent background-color style. (For pages with opaque |
69 // background-color style, this property is effectively ignored). | 69 // background-color style, this property is effectively ignored). |
70 // Setting this takes effect for the currently loaded page, if any, and | 70 // Setting this takes effect for the currently loaded page, if any, and |
71 // persists across subsequent navigations. Defaults to white prior to the | 71 // persists across subsequent navigations. Defaults to white prior to the |
72 // first call to this method. | 72 // first call to this method. |
73 virtual void setBaseBackgroundColor(WebColor) = 0; | 73 virtual void setBaseBackgroundColor(WebColor) = 0; |
74 | 74 |
75 // Returns the local root of this WebFrameWidget. | 75 // Returns the local root of this WebFrameWidget. |
76 virtual WebLocalFrame* localRoot() = 0; | 76 virtual WebLocalFrame* localRoot() = 0; |
77 | 77 |
78 // WebWidget implementation. | 78 // WebWidget implementation. |
79 bool isWebFrameWidget() const final { return true; } | 79 bool isWebFrameWidget() const final { return true; } |
80 }; | 80 }; |
81 | 81 |
82 } // namespace blink | 82 } // namespace blink |
83 | 83 |
84 #endif | 84 #endif |
OLD | NEW |