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

Side by Side Diff: mojo/examples/html_viewer/webthemeengine_impl.cc

Issue 358953002: Mojo: Add WebThemeEngine implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « mojo/examples/html_viewer/webthemeengine_impl.h ('k') | mojo/mojo_examples.gypi » ('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_default.h" 5 #include "mojo/examples/html_viewer/webthemeengine_impl.h"
6 6
7 #include "skia/ext/platform_canvas.h" 7 #include "skia/ext/platform_canvas.h"
8 #include "third_party/WebKit/public/platform/WebRect.h" 8 #include "third_party/WebKit/public/platform/WebRect.h"
9 #include "third_party/WebKit/public/platform/WebSize.h" 9 #include "third_party/WebKit/public/platform/WebSize.h"
10 #include "ui/native_theme/native_theme.h" 10 #include "ui/native_theme/native_theme.h"
11 11
12 using blink::WebCanvas; 12 using blink::WebCanvas;
13 using blink::WebColor; 13 using blink::WebColor;
14 using blink::WebRect; 14 using blink::WebRect;
15 using blink::WebThemeEngine; 15 using blink::WebThemeEngine;
16 16
17 namespace content { 17 namespace mojo {
18 namespace examples {
18 19
19 static ui::NativeTheme::Part NativeThemePart( 20 static ui::NativeTheme::Part NativeThemePart(
20 WebThemeEngine::Part part) { 21 WebThemeEngine::Part part) {
21 switch (part) { 22 switch (part) {
22 case WebThemeEngine::PartScrollbarDownArrow: 23 case WebThemeEngine::PartScrollbarDownArrow:
23 return ui::NativeTheme::kScrollbarDownArrow; 24 return ui::NativeTheme::kScrollbarDownArrow;
24 case WebThemeEngine::PartScrollbarLeftArrow: 25 case WebThemeEngine::PartScrollbarLeftArrow:
25 return ui::NativeTheme::kScrollbarLeftArrow; 26 return ui::NativeTheme::kScrollbarLeftArrow;
26 case WebThemeEngine::PartScrollbarRightArrow: 27 case WebThemeEngine::PartScrollbarRightArrow:
27 return ui::NativeTheme::kScrollbarRightArrow; 28 return ui::NativeTheme::kScrollbarRightArrow;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 const blink::WebRect& rect) { 193 const blink::WebRect& rect) {
193 ui::NativeTheme::instance()->PaintStateTransition( 194 ui::NativeTheme::instance()->PaintStateTransition(
194 canvas, 195 canvas,
195 NativeThemePart(part), 196 NativeThemePart(part),
196 NativeThemeState(startState), 197 NativeThemeState(startState),
197 NativeThemeState(endState), 198 NativeThemeState(endState),
198 progress, 199 progress,
199 gfx::Rect(rect)); 200 gfx::Rect(rect));
200 } 201 }
201 202
202 } // namespace content 203 } // namespace examples
204 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/examples/html_viewer/webthemeengine_impl.h ('k') | mojo/mojo_examples.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698