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

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

Issue 1156473002: Refactor FrameLoader loading interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 6 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 | « Source/core/loader/NavigationScheduler.cpp ('k') | Source/modules/plugins/DOMPluginArray.cpp » ('j') | 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 2000 matching lines...) Expand 10 before | Expand all | Expand 10 after
2011 } 2011 }
2012 2012
2013 PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(PassRefPtr<DOMArr ayBuffer> buffer) const 2013 PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(PassRefPtr<DOMArr ayBuffer> buffer) const
2014 { 2014 {
2015 String value(static_cast<const UChar*>(buffer->data()), buffer->byteLength() / sizeof(UChar)); 2015 String value(static_cast<const UChar*>(buffer->data()), buffer->byteLength() / sizeof(UChar));
2016 return SerializedScriptValueFactory::instance().createFromWire(value); 2016 return SerializedScriptValueFactory::instance().createFromWire(value);
2017 } 2017 }
2018 2018
2019 void Internals::forceReload(bool endToEnd) 2019 void Internals::forceReload(bool endToEnd)
2020 { 2020 {
2021 frame()->reload(endToEnd ? EndToEndReload : NormalReload, NotClientRedirect) ; 2021 frame()->reload(endToEnd ? FrameLoadTypeReloadFromOrigin : FrameLoadTypeRelo ad, NotClientRedirect);
2022 } 2022 }
2023 2023
2024 ClientRect* Internals::selectionBounds(ExceptionState& exceptionState) 2024 ClientRect* Internals::selectionBounds(ExceptionState& exceptionState)
2025 { 2025 {
2026 Document* document = contextDocument(); 2026 Document* document = contextDocument();
2027 if (!document || !document->frame()) { 2027 if (!document || !document->frame()) {
2028 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc ument's frame cannot be retrieved." : "No context document can be obtained."); 2028 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc ument's frame cannot be retrieved." : "No context document can be obtained.");
2029 return nullptr; 2029 return nullptr;
2030 } 2030 }
2031 2031
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
2364 2364
2365 ClientRectList* Internals::focusRingRects(Element* element) 2365 ClientRectList* Internals::focusRingRects(Element* element)
2366 { 2366 {
2367 Vector<LayoutRect> rects; 2367 Vector<LayoutRect> rects;
2368 if (element && element->layoutObject()) 2368 if (element && element->layoutObject())
2369 element->layoutObject()->addFocusRingRects(rects, LayoutPoint()); 2369 element->layoutObject()->addFocusRingRects(rects, LayoutPoint());
2370 return ClientRectList::create(rects); 2370 return ClientRectList::create(rects);
2371 } 2371 }
2372 2372
2373 } // namespace blink 2373 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/NavigationScheduler.cpp ('k') | Source/modules/plugins/DOMPluginArray.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698