Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: public/web/WebView.h

Issue 19883002: Expose a way to set a view's base background color. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: jamesr comments Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« Source/web/WebViewImpl.cpp ('K') | « Source/web/tests/WebViewTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011, 2012 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 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebView_h 31 #ifndef WebView_h
32 #define WebView_h 32 #define WebView_h
33 33
34 #include "../platform/WebColor.h"
34 #include "../platform/WebString.h" 35 #include "../platform/WebString.h"
35 #include "../platform/WebVector.h" 36 #include "../platform/WebVector.h"
36 #include "WebDragOperation.h" 37 #include "WebDragOperation.h"
37 #include "WebPageVisibilityState.h" 38 #include "WebPageVisibilityState.h"
38 #include "WebWidget.h" 39 #include "WebWidget.h"
39 40
40 namespace WebKit { 41 namespace WebKit {
41 42
42 class WebAccessibilityObject; 43 class WebAccessibilityObject;
43 class WebAutofillClient; 44 class WebAutofillClient;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // Corresponds to the encoding of the main frame. Setting the page 122 // Corresponds to the encoding of the main frame. Setting the page
122 // encoding may cause the main frame to reload. 123 // encoding may cause the main frame to reload.
123 virtual WebString pageEncoding() const = 0; 124 virtual WebString pageEncoding() const = 0;
124 virtual void setPageEncoding(const WebString&) = 0; 125 virtual void setPageEncoding(const WebString&) = 0;
125 126
126 // Makes the WebView transparent. This is useful if you want to have 127 // Makes the WebView transparent. This is useful if you want to have
127 // some custom background rendered behind it. 128 // some custom background rendered behind it.
128 virtual bool isTransparent() const = 0; 129 virtual bool isTransparent() const = 0;
129 virtual void setIsTransparent(bool) = 0; 130 virtual void setIsTransparent(bool) = 0;
130 131
132 // Sets the base color used for this WebView's background. This is in effect
133 // the default background color used for pages with no background-color
134 // style in effect, or used as the alpha-blended basis for any pages with
135 // translucent background-color style. (For pages with opaque
136 // background-color style, this property is effectively ignored).
137 // Setting this takes effect for the currently loaded page, if any, and
138 // persists across subsequent navigations. Defaults to white prior to the
139 // first call to this method.
140 virtual void setBaseBackgroundColor(WebColor) = 0;
141
131 // Controls whether pressing Tab key advances focus to links. 142 // Controls whether pressing Tab key advances focus to links.
132 virtual bool tabsToLinks() const = 0; 143 virtual bool tabsToLinks() const = 0;
133 virtual void setTabsToLinks(bool) = 0; 144 virtual void setTabsToLinks(bool) = 0;
134 145
135 // Method that controls whether pressing Tab key cycles through page 146 // Method that controls whether pressing Tab key cycles through page
136 // elements or inserts a '\t' char in the focused text area. 147 // elements or inserts a '\t' char in the focused text area.
137 virtual bool tabKeyCyclesThroughElements() const = 0; 148 virtual bool tabKeyCyclesThroughElements() const = 0;
138 virtual void setTabKeyCyclesThroughElements(bool) = 0; 149 virtual void setTabKeyCyclesThroughElements(bool) = 0;
139 150
140 // Controls the WebView's active state, which may affect the rendering 151 // Controls the WebView's active state, which may affect the rendering
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 512
502 // Testing functionality for TestRunner --------------------------------- 513 // Testing functionality for TestRunner ---------------------------------
503 514
504 protected: 515 protected:
505 ~WebView() {} 516 ~WebView() {}
506 }; 517 };
507 518
508 } // namespace WebKit 519 } // namespace WebKit
509 520
510 #endif 521 #endif
OLDNEW
« Source/web/WebViewImpl.cpp ('K') | « Source/web/tests/WebViewTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698