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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 18478003: Vibration cannot be canceled during pattern vibration. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Vibration cannot be canceled during pattern vibration. Created 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 #include "core/page/scrolling/ScrollingCoordinator.h" 94 #include "core/page/scrolling/ScrollingCoordinator.h"
95 #include "core/platform/ColorChooser.h" 95 #include "core/platform/ColorChooser.h"
96 #include "core/platform/Cursor.h" 96 #include "core/platform/Cursor.h"
97 #include "core/platform/Language.h" 97 #include "core/platform/Language.h"
98 #include "core/platform/graphics/IntRect.h" 98 #include "core/platform/graphics/IntRect.h"
99 #include "core/rendering/RenderMenuList.h" 99 #include "core/rendering/RenderMenuList.h"
100 #include "core/rendering/RenderObject.h" 100 #include "core/rendering/RenderObject.h"
101 #include "core/rendering/RenderTreeAsText.h" 101 #include "core/rendering/RenderTreeAsText.h"
102 #include "core/rendering/RenderView.h" 102 #include "core/rendering/RenderView.h"
103 #include "core/workers/WorkerThread.h" 103 #include "core/workers/WorkerThread.h"
104 #include "modules/vibration/NavigatorVibration.h"
abarth-chromium 2013/07/08 21:04:59 Technically this is a bad dependency. You should
haraken 2013/07/12 09:21:42 The right solution would be to add modules/vibrati
kihong 2013/07/17 02:19:16 I added FIXME here and nbarth@ going to implement
104 #include "weborigin/SchemeRegistry.h" 105 #include "weborigin/SchemeRegistry.h"
105 #include "wtf/dtoa.h" 106 #include "wtf/dtoa.h"
106 #include "wtf/text/StringBuffer.h" 107 #include "wtf/text/StringBuffer.h"
107 108
108 #include "core/page/PagePopupController.h" 109 #include "core/page/PagePopupController.h"
109 #include "core/platform/graphics/GraphicsLayer.h" 110 #include "core/platform/graphics/GraphicsLayer.h"
110 #include "core/platform/graphics/filters/FilterOperation.h" 111 #include "core/platform/graphics/filters/FilterOperation.h"
111 #include "core/platform/graphics/filters/FilterOperations.h" 112 #include "core/platform/graphics/filters/FilterOperations.h"
112 #include "core/rendering/RenderLayerBacking.h" 113 #include "core/rendering/RenderLayerBacking.h"
113 114
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1986 HTMLSelectElement* select = toHTMLSelectElement(node); 1987 HTMLSelectElement* select = toHTMLSelectElement(node);
1987 1988
1988 RenderObject* renderer = select->renderer(); 1989 RenderObject* renderer = select->renderer();
1989 if (!renderer->isMenuList()) 1990 if (!renderer->isMenuList())
1990 return false; 1991 return false;
1991 1992
1992 RenderMenuList* menuList = toRenderMenuList(renderer); 1993 RenderMenuList* menuList = toRenderMenuList(renderer);
1993 return menuList->popupIsVisible(); 1994 return menuList->popupIsVisible();
1994 } 1995 }
1995 1996
1997 bool Internals::isVibrating()
1998 {
1999 Document* document = contextDocument();
abarth-chromium 2013/07/08 21:04:59 It's better to pass in |document| explicitly.
kihong 2013/07/12 11:04:13 Done.
2000 ASSERT(document && document->domWindow());
2001
2002 return NavigatorVibration::from(document->domWindow()->navigator())->isVibra ting();
1996 } 2003 }
2004
2005 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698