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

Unified Diff: content/child/webthemeengine_impl_mac.cc

Issue 542903002: Do the murdering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/webthemeengine_impl_mac.h ('k') | content/content_child.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webthemeengine_impl_mac.cc
diff --git a/content/child/webthemeengine_impl_mac.cc b/content/child/webthemeengine_impl_mac.cc
deleted file mode 100644
index 62a5da11ef3a90fb85e5e6c25a44c0266f6ecc32..0000000000000000000000000000000000000000
--- a/content/child/webthemeengine_impl_mac.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/child/webthemeengine_impl_mac.h"
-
-#include <Carbon/Carbon.h>
-
-#include "skia/ext/skia_utils_mac.h"
-#include "third_party/WebKit/public/platform/WebCanvas.h"
-#include "third_party/WebKit/public/platform/WebRect.h"
-
-using blink::WebCanvas;
-using blink::WebRect;
-using blink::WebThemeEngine;
-
-namespace content {
-
-static ThemeTrackEnableState stateToHIEnableState(WebThemeEngine::State state) {
- switch (state) {
- case WebThemeEngine::StateDisabled:
- return kThemeTrackDisabled;
- case WebThemeEngine::StateInactive:
- return kThemeTrackInactive;
- default:
- return kThemeTrackActive;
- }
-}
-
-void WebThemeEngineImpl::paintScrollbarThumb(
- WebCanvas* canvas,
- WebThemeEngine::State state,
- WebThemeEngine::Size size,
- const WebRect& rect,
- const WebThemeEngine::ScrollbarInfo& scrollbarInfo) {
- HIThemeTrackDrawInfo trackInfo;
- trackInfo.version = 0;
- trackInfo.kind = size == WebThemeEngine::SizeRegular ?
- kThemeMediumScrollBar : kThemeSmallScrollBar;
- trackInfo.bounds = CGRectMake(rect.x, rect.y, rect.width, rect.height);
- trackInfo.min = 0;
- trackInfo.max = scrollbarInfo.maxValue;
- trackInfo.value = scrollbarInfo.currentValue;
- trackInfo.trackInfo.scrollbar.viewsize = scrollbarInfo.visibleSize;
- trackInfo.attributes = 0;
- if (scrollbarInfo.orientation ==
- WebThemeEngine::ScrollbarOrientationHorizontal) {
- trackInfo.attributes |= kThemeTrackHorizontal;
- }
-
- trackInfo.enableState = stateToHIEnableState(state);
-
- trackInfo.trackInfo.scrollbar.pressState =
- state == WebThemeEngine::StatePressed ? kThemeThumbPressed : 0;
- trackInfo.attributes |= (kThemeTrackShowThumb | kThemeTrackHideTrack);
- gfx::SkiaBitLocker bitLocker(canvas);
- CGContextRef cgContext = bitLocker.cgContext();
- HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal);
-}
-
-} // namespace content
« no previous file with comments | « content/child/webthemeengine_impl_mac.h ('k') | content/content_child.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698