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

Side by Side Diff: sky/engine/web/WebLocalFrameImpl.cpp

Issue 868933003: Remove user gesture tracking (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 #include "sky/engine/core/page/FocusController.h" 107 #include "sky/engine/core/page/FocusController.h"
108 #include "sky/engine/core/page/Page.h" 108 #include "sky/engine/core/page/Page.h"
109 #include "sky/engine/core/rendering/HitTestResult.h" 109 #include "sky/engine/core/rendering/HitTestResult.h"
110 #include "sky/engine/core/rendering/RenderBox.h" 110 #include "sky/engine/core/rendering/RenderBox.h"
111 #include "sky/engine/core/rendering/RenderLayer.h" 111 #include "sky/engine/core/rendering/RenderLayer.h"
112 #include "sky/engine/core/rendering/RenderObject.h" 112 #include "sky/engine/core/rendering/RenderObject.h"
113 #include "sky/engine/core/rendering/RenderTreeAsText.h" 113 #include "sky/engine/core/rendering/RenderTreeAsText.h"
114 #include "sky/engine/core/rendering/RenderView.h" 114 #include "sky/engine/core/rendering/RenderView.h"
115 #include "sky/engine/core/rendering/style/StyleInheritedData.h" 115 #include "sky/engine/core/rendering/style/StyleInheritedData.h"
116 #include "sky/engine/platform/TraceEvent.h" 116 #include "sky/engine/platform/TraceEvent.h"
117 #include "sky/engine/platform/UserGestureIndicator.h"
118 #include "sky/engine/platform/clipboard/ClipboardUtilities.h" 117 #include "sky/engine/platform/clipboard/ClipboardUtilities.h"
119 #include "sky/engine/platform/fonts/FontCache.h" 118 #include "sky/engine/platform/fonts/FontCache.h"
120 #include "sky/engine/platform/graphics/GraphicsContext.h" 119 #include "sky/engine/platform/graphics/GraphicsContext.h"
121 #include "sky/engine/platform/graphics/skia/SkiaUtils.h" 120 #include "sky/engine/platform/graphics/skia/SkiaUtils.h"
122 #include "sky/engine/platform/heap/Handle.h" 121 #include "sky/engine/platform/heap/Handle.h"
123 #include "sky/engine/platform/network/ResourceRequest.h" 122 #include "sky/engine/platform/network/ResourceRequest.h"
124 #include "sky/engine/platform/scroll/ScrollTypes.h" 123 #include "sky/engine/platform/scroll/ScrollTypes.h"
125 #include "sky/engine/platform/scroll/Scrollbar.h" 124 #include "sky/engine/platform/scroll/Scrollbar.h"
126 #include "sky/engine/platform/weborigin/KURL.h" 125 #include "sky/engine/platform/weborigin/KURL.h"
127 #include "sky/engine/platform/weborigin/SecurityPolicy.h" 126 #include "sky/engine/platform/weborigin/SecurityPolicy.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 void WebLocalFrameImpl::collectGarbage() 281 void WebLocalFrameImpl::collectGarbage()
283 { 282 {
284 if (!frame()) 283 if (!frame())
285 return; 284 return;
286 V8GCController::collectGarbage(v8::Isolate::GetCurrent()); 285 V8GCController::collectGarbage(v8::Isolate::GetCurrent());
287 } 286 }
288 287
289 v8::Handle<v8::Value> WebLocalFrameImpl::executeScriptAndReturnValue(const WebSc riptSource& source) 288 v8::Handle<v8::Value> WebLocalFrameImpl::executeScriptAndReturnValue(const WebSc riptSource& source)
290 { 289 {
291 ASSERT(frame()); 290 ASSERT(frame());
292
293 // TODO: Remove this after blink has rolled and chromium change landed. (crr ev.com/516753002)
294 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
295
296 TextPosition position(OrdinalNumber::fromOneBasedInt(source.startLine), Ordi nalNumber::first()); 291 TextPosition position(OrdinalNumber::fromOneBasedInt(source.startLine), Ordi nalNumber::first());
297 return frame()->script().executeScriptInMainWorldAndReturnValue(ScriptSource Code(source.code, source.url, position)); 292 return frame()->script().executeScriptInMainWorldAndReturnValue(ScriptSource Code(source.code, source.url, position));
298 } 293 }
299 294
300 v8::Handle<v8::Value> WebLocalFrameImpl::callFunctionEvenIfScriptDisabled(v8::Ha ndle<v8::Function> function, v8::Handle<v8::Value> receiver, int argc, v8::Handl e<v8::Value> argv[]) 295 v8::Handle<v8::Value> WebLocalFrameImpl::callFunctionEvenIfScriptDisabled(v8::Ha ndle<v8::Function> function, v8::Handle<v8::Value> receiver, int argc, v8::Handl e<v8::Value> argv[])
301 { 296 {
302 ASSERT(frame()); 297 ASSERT(frame());
303 return frame()->script().callFunction(function, receiver, argc, argv); 298 return frame()->script().callFunction(function, receiver, argc, argv);
304 } 299 }
305 300
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 670
676 void WebLocalFrameImpl::setInputEventsTransformForEmulation(const IntSize& offse t, float contentScaleFactor) 671 void WebLocalFrameImpl::setInputEventsTransformForEmulation(const IntSize& offse t, float contentScaleFactor)
677 { 672 {
678 m_inputEventsOffsetForEmulation = offset; 673 m_inputEventsOffsetForEmulation = offset;
679 m_inputEventsScaleFactorForEmulation = contentScaleFactor; 674 m_inputEventsScaleFactorForEmulation = contentScaleFactor;
680 if (frame()->view()) 675 if (frame()->view())
681 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffset ForEmulation, m_inputEventsScaleFactorForEmulation); 676 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffset ForEmulation, m_inputEventsScaleFactorForEmulation);
682 } 677 }
683 678
684 } // namespace blink 679 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698