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

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 24202004: Rename ENABLE(DEFAULT_RENDER_THEME) to USE(DEFAULT_RENDER_THEME). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 2 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
« no previous file with comments | « Source/build/features.gypi ('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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 #include "public/platform/WebVector.h" 158 #include "public/platform/WebVector.h"
159 #include "weborigin/SchemeRegistry.h" 159 #include "weborigin/SchemeRegistry.h"
160 #include "weborigin/SecurityOrigin.h" 160 #include "weborigin/SecurityOrigin.h"
161 #include "weborigin/SecurityPolicy.h" 161 #include "weborigin/SecurityPolicy.h"
162 #include "wtf/CurrentTime.h" 162 #include "wtf/CurrentTime.h"
163 #include "wtf/MainThread.h" 163 #include "wtf/MainThread.h"
164 #include "wtf/RefPtr.h" 164 #include "wtf/RefPtr.h"
165 #include "wtf/TemporaryChange.h" 165 #include "wtf/TemporaryChange.h"
166 #include "wtf/Uint8ClampedArray.h" 166 #include "wtf/Uint8ClampedArray.h"
167 167
168 #if ENABLE(DEFAULT_RENDER_THEME) 168 #if USE(DEFAULT_RENDER_THEME)
169 #include "core/platform/chromium/PlatformThemeChromiumDefault.h" 169 #include "core/platform/chromium/PlatformThemeChromiumDefault.h"
170 #include "core/rendering/RenderThemeChromiumDefault.h" 170 #include "core/rendering/RenderThemeChromiumDefault.h"
171 #endif 171 #endif
172 172
173 #if OS(WIN) 173 #if OS(WIN)
174 #if !ENABLE(DEFAULT_RENDER_THEME) 174 #if !USE(DEFAULT_RENDER_THEME)
175 #include "core/rendering/RenderThemeChromiumWin.h" 175 #include "core/rendering/RenderThemeChromiumWin.h"
176 #endif 176 #endif
177 #else 177 #else
178 #include "core/rendering/RenderTheme.h" 178 #include "core/rendering/RenderTheme.h"
179 #endif 179 #endif
180 180
181 // Get rid of WTF's pow define so we can use std::pow. 181 // Get rid of WTF's pow define so we can use std::pow.
182 #undef pow 182 #undef pow
183 #include <cmath> // for std::pow 183 #include <cmath> // for std::pow
184 184
(...skipping 3441 matching lines...) Expand 10 before | Expand all | Expand 10 after
3626 } 3626 }
3627 3627
3628 void WebViewImpl::setWindowFeatures(const WebWindowFeatures& features) 3628 void WebViewImpl::setWindowFeatures(const WebWindowFeatures& features)
3629 { 3629 {
3630 m_page->chrome().setWindowFeatures(features); 3630 m_page->chrome().setWindowFeatures(features);
3631 } 3631 }
3632 3632
3633 void WebViewImpl::setScrollbarColors(unsigned inactiveColor, 3633 void WebViewImpl::setScrollbarColors(unsigned inactiveColor,
3634 unsigned activeColor, 3634 unsigned activeColor,
3635 unsigned trackColor) { 3635 unsigned trackColor) {
3636 #if ENABLE(DEFAULT_RENDER_THEME) 3636 #if USE(DEFAULT_RENDER_THEME)
3637 PlatformThemeChromiumDefault::setScrollbarColors(inactiveColor, activeColor, trackColor); 3637 PlatformThemeChromiumDefault::setScrollbarColors(inactiveColor, activeColor, trackColor);
3638 #endif 3638 #endif
3639 } 3639 }
3640 3640
3641 void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor, 3641 void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor,
3642 unsigned activeForegroundColor, 3642 unsigned activeForegroundColor,
3643 unsigned inactiveBackgroundColor, 3643 unsigned inactiveBackgroundColor,
3644 unsigned inactiveForegroundColor) { 3644 unsigned inactiveForegroundColor) {
3645 #if ENABLE(DEFAULT_RENDER_THEME) 3645 #if USE(DEFAULT_RENDER_THEME)
3646 RenderThemeChromiumDefault::setSelectionColors(activeBackgroundColor, active ForegroundColor, inactiveBackgroundColor, inactiveForegroundColor); 3646 RenderThemeChromiumDefault::setSelectionColors(activeBackgroundColor, active ForegroundColor, inactiveBackgroundColor, inactiveForegroundColor);
3647 RenderTheme::theme().platformColorsDidChange(); 3647 RenderTheme::theme().platformColorsDidChange();
3648 #endif 3648 #endif
3649 } 3649 }
3650 3650
3651 void WebView::injectStyleSheet(const WebString& sourceCode, const WebVector<WebS tring>& patternsIn, WebView::StyleInjectionTarget injectIn) 3651 void WebView::injectStyleSheet(const WebString& sourceCode, const WebVector<WebS tring>& patternsIn, WebView::StyleInjectionTarget injectIn)
3652 { 3652 {
3653 Vector<String> patterns; 3653 Vector<String> patterns;
3654 for (size_t i = 0; i < patternsIn.size(); ++i) 3654 for (size_t i = 0; i < patternsIn.size(); ++i)
3655 patterns.append(patternsIn[i]); 3655 patterns.append(patternsIn[i]);
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
4203 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4203 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4204 4204
4205 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4205 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4206 return false; 4206 return false;
4207 4207
4208 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4208 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4209 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4209 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4210 } 4210 }
4211 4211
4212 } // namespace WebKit 4212 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/build/features.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698