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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2723973002: Make V8Binding helpers return LocalFrame/LocalDOMWindow as appropriate (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/bindings/templates/interface_base.cpp.tmpl ('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) 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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 499
500 WebLocalFrame* WebLocalFrame::frameForCurrentContext() { 500 WebLocalFrame* WebLocalFrame::frameForCurrentContext() {
501 v8::Local<v8::Context> context = 501 v8::Local<v8::Context> context =
502 v8::Isolate::GetCurrent()->GetCurrentContext(); 502 v8::Isolate::GetCurrent()->GetCurrentContext();
503 if (context.IsEmpty()) 503 if (context.IsEmpty())
504 return 0; 504 return 0;
505 return frameForContext(context); 505 return frameForContext(context);
506 } 506 }
507 507
508 WebLocalFrame* WebLocalFrame::frameForContext(v8::Local<v8::Context> context) { 508 WebLocalFrame* WebLocalFrame::frameForContext(v8::Local<v8::Context> context) {
509 return WebLocalFrameImpl::fromFrame( 509 return WebLocalFrameImpl::fromFrame(toLocalFrameIfNotDetached(context));
510 toLocalFrame(toFrameIfNotDetached(context)));
511 } 510 }
512 511
513 WebLocalFrame* WebLocalFrame::fromFrameOwnerElement(const WebElement& element) { 512 WebLocalFrame* WebLocalFrame::fromFrameOwnerElement(const WebElement& element) {
514 return WebLocalFrameImpl::fromFrameOwnerElement(element); 513 return WebLocalFrameImpl::fromFrameOwnerElement(element);
515 } 514 }
516 515
517 bool WebLocalFrameImpl::isWebLocalFrame() const { 516 bool WebLocalFrameImpl::isWebLocalFrame() const {
518 return true; 517 return true;
519 } 518 }
520 519
(...skipping 1939 matching lines...) Expand 10 before | Expand all | Expand 10 after
2460 createMarkup(startPosition, endPosition, AnnotateForInterchange, 2459 createMarkup(startPosition, endPosition, AnnotateForInterchange,
2461 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2460 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2462 } else { 2461 } else {
2463 clipHtml = 2462 clipHtml =
2464 createMarkup(endPosition, startPosition, AnnotateForInterchange, 2463 createMarkup(endPosition, startPosition, AnnotateForInterchange,
2465 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2464 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2466 } 2465 }
2467 } 2466 }
2468 2467
2469 } // namespace blink 2468 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698