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

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

Issue 2720933003: Removed FrameHost::useCounter() (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3071 matching lines...) Expand 10 before | Expand all | Expand 10 after
3082 return promise; 3082 return promise;
3083 } 3083 }
3084 3084
3085 UseCounter::Feature useCounterFeature = 3085 UseCounter::Feature useCounterFeature =
3086 static_cast<UseCounter::Feature>(feature); 3086 static_cast<UseCounter::Feature>(feature);
3087 if (UseCounter::isCounted(*document, useCounterFeature)) { 3087 if (UseCounter::isCounted(*document, useCounterFeature)) {
3088 resolver->resolve(); 3088 resolver->resolve();
3089 return promise; 3089 return promise;
3090 } 3090 }
3091 3091
3092 Frame* frame = document->frame(); 3092 Page* page = document->page();
3093 if (!frame || !frame->host()) { 3093 if (!page) {
3094 resolver->reject(); 3094 resolver->reject();
3095 return promise; 3095 return promise;
3096 } 3096 }
3097 3097
3098 frame->host()->useCounter().addObserver( 3098 page->useCounter().addObserver(
3099 new UseCounterObserverImpl(resolver, useCounterFeature)); 3099 new UseCounterObserverImpl(resolver, useCounterFeature));
3100 return promise; 3100 return promise;
3101 } 3101 }
3102 3102
3103 String Internals::unscopableAttribute() { 3103 String Internals::unscopableAttribute() {
3104 return "unscopableAttribute"; 3104 return "unscopableAttribute";
3105 } 3105 }
3106 3106
3107 String Internals::unscopableMethod() { 3107 String Internals::unscopableMethod() {
3108 return "unscopableMethod"; 3108 return "unscopableMethod";
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
3176 3176
3177 void Internals::crash() { 3177 void Internals::crash() {
3178 CHECK(false) << "Intentional crash"; 3178 CHECK(false) << "Intentional crash";
3179 } 3179 }
3180 3180
3181 void Internals::setIsLowEndDevice(bool isLowEndDevice) { 3181 void Internals::setIsLowEndDevice(bool isLowEndDevice) {
3182 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); 3182 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice);
3183 } 3183 }
3184 3184
3185 } // namespace blink 3185 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698