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

Side by Side Diff: Source/core/platform/ScrollbarThemeMacCommon.mm

Issue 23187005: [DevTools] Use device metrics emulation implemented in content. (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2011 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 14 matching lines...) Expand all
25 25
26 #include "config.h" 26 #include "config.h"
27 #include "core/platform/ScrollbarThemeMacCommon.h" 27 #include "core/platform/ScrollbarThemeMacCommon.h"
28 28
29 #include <Carbon/Carbon.h> 29 #include <Carbon/Carbon.h>
30 #include "core/page/FrameView.h" 30 #include "core/page/FrameView.h"
31 #include "core/platform/PlatformMouseEvent.h" 31 #include "core/platform/PlatformMouseEvent.h"
32 #include "core/platform/ScrollView.h" 32 #include "core/platform/ScrollView.h"
33 #include "core/platform/ScrollbarThemeMacNonOverlayAPI.h" 33 #include "core/platform/ScrollbarThemeMacNonOverlayAPI.h"
34 #include "core/platform/ScrollbarThemeMacOverlayAPI.h" 34 #include "core/platform/ScrollbarThemeMacOverlayAPI.h"
35 #include "core/platform/ScrollbarThemeOverlay.h"
35 #include "core/platform/graphics/Gradient.h" 36 #include "core/platform/graphics/Gradient.h"
36 #include "core/platform/graphics/GraphicsContext.h" 37 #include "core/platform/graphics/GraphicsContext.h"
37 #include "core/platform/graphics/GraphicsContextStateSaver.h" 38 #include "core/platform/graphics/GraphicsContextStateSaver.h"
38 #include "core/platform/graphics/GraphicsLayer.h" 39 #include "core/platform/graphics/GraphicsLayer.h"
39 #include "core/platform/graphics/ImageBuffer.h" 40 #include "core/platform/graphics/ImageBuffer.h"
40 #include "core/platform/graphics/mac/ColorMac.h" 41 #include "core/platform/graphics/mac/ColorMac.h"
41 #include "core/platform/mac/LocalCurrentGraphicsContext.h" 42 #include "core/platform/mac/LocalCurrentGraphicsContext.h"
42 #include "core/platform/mac/NSScrollerImpDetails.h" 43 #include "core/platform/mac/NSScrollerImpDetails.h"
43 #include "core/platform/mac/ScrollAnimatorMac.h" 44 #include "core/platform/mac/ScrollAnimatorMac.h"
44 #include "public/platform/mac/WebThemeEngine.h" 45 #include "public/platform/mac/WebThemeEngine.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 @end 122 @end
122 123
123 namespace WebCore { 124 namespace WebCore {
124 125
125 static float gInitialButtonDelay = 0.5f; 126 static float gInitialButtonDelay = 0.5f;
126 static float gAutoscrollButtonDelay = 0.05f; 127 static float gAutoscrollButtonDelay = 0.05f;
127 static bool gJumpOnTrackClick = false; 128 static bool gJumpOnTrackClick = false;
128 129
129 ScrollbarTheme* ScrollbarTheme::nativeTheme() 130 ScrollbarTheme* ScrollbarTheme::nativeTheme()
130 { 131 {
132 if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) {
pfeldman 2013/09/19 12:46:05 Lets land this separately.
dgozman 2013/09/19 13:59:38 Done.
133 DEFINE_STATIC_LOCAL(ScrollbarThemeOverlay, theme, (7, 0, ScrollbarThemeO verlay::AllowHitTest));
134 return &theme;
135 }
136
131 if (isScrollbarOverlayAPIAvailable()) { 137 if (isScrollbarOverlayAPIAvailable()) {
132 DEFINE_STATIC_LOCAL(ScrollbarThemeMacOverlayAPI, theme, ()); 138 DEFINE_STATIC_LOCAL(ScrollbarThemeMacOverlayAPI, theme, ());
133 return &theme; 139 return &theme;
134 } else { 140 } else {
135 DEFINE_STATIC_LOCAL(ScrollbarThemeMacNonOverlayAPI, theme, ()); 141 DEFINE_STATIC_LOCAL(ScrollbarThemeMacNonOverlayAPI, theme, ());
136 return &theme; 142 return &theme;
137 } 143 }
138 return NULL; 144 return NULL;
139 } 145 }
140 146
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 case ForwardButtonEndPart: 425 case ForwardButtonEndPart:
420 return kThemeBottomOutsideArrowPressed; 426 return kThemeBottomOutsideArrowPressed;
421 case ThumbPart: 427 case ThumbPart:
422 return kThemeThumbPressed; 428 return kThemeThumbPressed;
423 default: 429 default:
424 return 0; 430 return 0;
425 } 431 }
426 } 432 }
427 433
428 } // namespace WebCore 434 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698