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

Side by Side Diff: content/child/webthemeengine_impl_android.cc

Issue 2480063002: Split NativeThemeAura into Overlay and NonOverlay versions. (Closed)
Patch Set: Fix Created 4 years, 1 month 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 | « no previous file | content/child/webthemeengine_impl_default.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/webthemeengine_impl_android.h" 5 #include "content/child/webthemeengine_impl_android.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/sys_info.h" 8 #include "base/sys_info.h"
9 #include "skia/ext/platform_canvas.h" 9 #include "skia/ext/platform_canvas.h"
10 #include "third_party/WebKit/public/platform/WebRect.h" 10 #include "third_party/WebKit/public/platform/WebRect.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 native_theme_extra_params->progress_bar.value_rect_height = 161 native_theme_extra_params->progress_bar.value_rect_height =
162 extra_params->progressBar.valueRectHeight; 162 extra_params->progressBar.valueRectHeight;
163 break; 163 break;
164 default: 164 default:
165 break; // Parts that have no extra params get here. 165 break; // Parts that have no extra params get here.
166 } 166 }
167 } 167 }
168 168
169 blink::WebSize WebThemeEngineImpl::getSize(WebThemeEngine::Part part) { 169 blink::WebSize WebThemeEngineImpl::getSize(WebThemeEngine::Part part) {
170 ui::NativeTheme::ExtraParams extra; 170 ui::NativeTheme::ExtraParams extra;
171 return ui::NativeTheme::GetInstanceForWeb()->GetPartSize( 171 return ui::NativeTheme::GetInstanceForWeb(true)->GetPartSize(
172 NativeThemePart(part), ui::NativeTheme::kNormal, extra); 172 NativeThemePart(part), ui::NativeTheme::kNormal, extra);
173 } 173 }
174 174
175 void WebThemeEngineImpl::getOverlayScrollbarStyle(ScrollbarStyle* style) { 175 void WebThemeEngineImpl::getOverlayScrollbarStyle(ScrollbarStyle* style) {
176 // TODO(bokan): Android scrollbars on non-composited scrollers don't 176 // TODO(bokan): Android scrollbars on non-composited scrollers don't
177 // currently fade out so the fadeOutDuration and Delay Now that this has 177 // currently fade out so the fadeOutDuration and Delay Now that this has
178 // been added into Blink for other platforms we should plumb that through for 178 // been added into Blink for other platforms we should plumb that through for
179 // Android as well. 179 // Android as well.
180 style->fadeOutDelaySeconds = 0; 180 style->fadeOutDelaySeconds = 0;
181 style->fadeOutDurationSeconds = 0; 181 style->fadeOutDurationSeconds = 0;
(...skipping 10 matching lines...) Expand all
192 192
193 void WebThemeEngineImpl::paint( 193 void WebThemeEngineImpl::paint(
194 blink::WebCanvas* canvas, 194 blink::WebCanvas* canvas,
195 WebThemeEngine::Part part, 195 WebThemeEngine::Part part,
196 WebThemeEngine::State state, 196 WebThemeEngine::State state,
197 const blink::WebRect& rect, 197 const blink::WebRect& rect,
198 const WebThemeEngine::ExtraParams* extra_params) { 198 const WebThemeEngine::ExtraParams* extra_params) {
199 ui::NativeTheme::ExtraParams native_theme_extra_params; 199 ui::NativeTheme::ExtraParams native_theme_extra_params;
200 GetNativeThemeExtraParams( 200 GetNativeThemeExtraParams(
201 part, state, extra_params, &native_theme_extra_params); 201 part, state, extra_params, &native_theme_extra_params);
202 ui::NativeTheme::GetInstanceForWeb()->Paint( 202 ui::NativeTheme::GetInstanceForWeb(true)->Paint(
203 canvas, NativeThemePart(part), NativeThemeState(state), gfx::Rect(rect), 203 canvas, NativeThemePart(part), NativeThemeState(state), gfx::Rect(rect),
204 native_theme_extra_params); 204 native_theme_extra_params);
205 } 205 }
206 } // namespace content 206 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/child/webthemeengine_impl_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698