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

Side by Side Diff: content/child/blink_platform_impl.cc

Issue 2874263002: Don't count modifiers-changed events as being user gestures. (Closed)
Patch Set: Created 3 years, 7 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 // 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/blink_platform_impl.h" 5 #include "content/child/blink_platform_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 WebString BlinkPlatformImpl::DomKeyStringFromEnum(int dom_key) { 825 WebString BlinkPlatformImpl::DomKeyStringFromEnum(int dom_key) {
826 return WebString::FromUTF8(ui::KeycodeConverter::DomKeyToKeyString( 826 return WebString::FromUTF8(ui::KeycodeConverter::DomKeyToKeyString(
827 static_cast<ui::DomKey>(dom_key))); 827 static_cast<ui::DomKey>(dom_key)));
828 } 828 }
829 829
830 int BlinkPlatformImpl::DomKeyEnumFromString(const WebString& key_string) { 830 int BlinkPlatformImpl::DomKeyEnumFromString(const WebString& key_string) {
831 return static_cast<int>( 831 return static_cast<int>(
832 ui::KeycodeConverter::KeyStringToDomKey(key_string.Utf8())); 832 ui::KeycodeConverter::KeyStringToDomKey(key_string.Utf8()));
833 } 833 }
834 834
835 bool BlinkPlatformImpl::IsDomKeyForModifier(int dom_key) {
836 return ui::KeycodeConverter::IsDomKeyForModifier(
837 static_cast<ui::DomKey>(dom_key));
838 }
839
835 std::unique_ptr<blink::WebFeaturePolicy> BlinkPlatformImpl::CreateFeaturePolicy( 840 std::unique_ptr<blink::WebFeaturePolicy> BlinkPlatformImpl::CreateFeaturePolicy(
836 const blink::WebFeaturePolicy* parent_policy, 841 const blink::WebFeaturePolicy* parent_policy,
837 const blink::WebParsedFeaturePolicy& container_policy, 842 const blink::WebParsedFeaturePolicy& container_policy,
838 const blink::WebParsedFeaturePolicy& policy_header, 843 const blink::WebParsedFeaturePolicy& policy_header,
839 const blink::WebSecurityOrigin& origin) { 844 const blink::WebSecurityOrigin& origin) {
840 std::unique_ptr<FeaturePolicy> policy = FeaturePolicy::CreateFromParentPolicy( 845 std::unique_ptr<FeaturePolicy> policy = FeaturePolicy::CreateFromParentPolicy(
841 static_cast<const FeaturePolicy*>(parent_policy), 846 static_cast<const FeaturePolicy*>(parent_policy),
842 FeaturePolicyHeaderFromWeb(container_policy), url::Origin(origin)); 847 FeaturePolicyHeaderFromWeb(container_policy), url::Origin(origin));
843 policy->SetHeaderPolicy(FeaturePolicyHeaderFromWeb(policy_header)); 848 policy->SetHeaderPolicy(FeaturePolicyHeaderFromWeb(policy_header));
844 return std::move(policy); 849 return std::move(policy);
845 } 850 }
846 851
847 std::unique_ptr<blink::WebFeaturePolicy> 852 std::unique_ptr<blink::WebFeaturePolicy>
848 BlinkPlatformImpl::DuplicateFeaturePolicyWithOrigin( 853 BlinkPlatformImpl::DuplicateFeaturePolicyWithOrigin(
849 const blink::WebFeaturePolicy& policy, 854 const blink::WebFeaturePolicy& policy,
850 const blink::WebSecurityOrigin& new_origin) { 855 const blink::WebSecurityOrigin& new_origin) {
851 return FeaturePolicy::CreateFromPolicyWithOrigin( 856 return FeaturePolicy::CreateFromPolicyWithOrigin(
852 static_cast<const FeaturePolicy&>(policy), url::Origin(new_origin)); 857 static_cast<const FeaturePolicy&>(policy), url::Origin(new_origin));
853 } 858 }
854 859
855 } // namespace content 860 } // namespace content
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | third_party/WebKit/Source/core/input/KeyboardEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698