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

Side by Side Diff: third_party/WebKit/public/web/WebFrame.h

Issue 2837593002: Nuked WebFrameImplBase. (Closed)
Patch Set: Replaced non-null params with refs. 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 /* 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class Function; 45 class Function;
46 class Value; 46 class Value;
47 template <class T> 47 template <class T>
48 class Local; 48 class Local;
49 } 49 }
50 50
51 namespace blink { 51 namespace blink {
52 52
53 class Frame; 53 class Frame;
54 class OpenedFrameTracker; 54 class OpenedFrameTracker;
55 class Page;
55 class Visitor; 56 class Visitor;
56 class WebAssociatedURLLoader; 57 class WebAssociatedURLLoader;
57 struct WebAssociatedURLLoaderOptions; 58 struct WebAssociatedURLLoaderOptions;
58 class WebDOMEvent; 59 class WebDOMEvent;
59 class WebData; 60 class WebData;
60 class WebDataSource; 61 class WebDataSource;
61 class WebDocument; 62 class WebDocument;
62 class WebElement; 63 class WebElement;
63 class WebFrameImplBase;
64 class WebLocalFrame; 64 class WebLocalFrame;
65 class WebPerformance; 65 class WebPerformance;
66 class WebRemoteFrame; 66 class WebRemoteFrame;
67 class WebSecurityOrigin; 67 class WebSecurityOrigin;
68 class WebSharedWorkerRepositoryClient; 68 class WebSharedWorkerRepositoryClient;
69 class WebString; 69 class WebString;
70 class WebURL; 70 class WebURL;
71 class WebURLRequest; 71 class WebURLRequest;
72 class WebView; 72 class WebView;
73 enum class WebSandboxFlags; 73 enum class WebSandboxFlags;
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 // Returns the bounds rect for current selection. If selection is performed 410 // Returns the bounds rect for current selection. If selection is performed
411 // on transformed text, the rect will still bound the selection but will 411 // on transformed text, the rect will still bound the selection but will
412 // not be transformed itself. If no selection is present, the rect will be 412 // not be transformed itself. If no selection is present, the rect will be
413 // empty ((0,0), (0,0)). 413 // empty ((0,0), (0,0)).
414 virtual WebRect SelectionBoundsRect() const = 0; 414 virtual WebRect SelectionBoundsRect() const = 0;
415 415
416 // Dumps the layer tree, used by the accelerated compositor, in 416 // Dumps the layer tree, used by the accelerated compositor, in
417 // text form. This is used only by layout tests. 417 // text form. This is used only by layout tests.
418 virtual WebString LayerTreeAsText(bool show_debug_info = false) const = 0; 418 virtual WebString LayerTreeAsText(bool show_debug_info = false) const = 0;
419 419
420 virtual WebFrameImplBase* ToImplBase() = 0;
421 // TODO(dcheng): Fix const-correctness issues and remove this overload.
422 virtual const WebFrameImplBase* ToImplBase() const {
423 return const_cast<WebFrame*>(this)->ToImplBase();
424 }
425
426 // Returns the frame inside a given frame or iframe element. Returns 0 if 420 // Returns the frame inside a given frame or iframe element. Returns 0 if
427 // the given element is not a frame, iframe or if the frame is empty. 421 // the given element is not a frame, iframe or if the frame is empty.
428 BLINK_EXPORT static WebFrame* FromFrameOwnerElement(const WebElement&); 422 BLINK_EXPORT static WebFrame* FromFrameOwnerElement(const WebElement&);
429 423
430 #if BLINK_IMPLEMENTATION 424 #if BLINK_IMPLEMENTATION
425 // TODO(mustaq): Should be named FromCoreFrame instead.
431 static WebFrame* FromFrame(Frame*); 426 static WebFrame* FromFrame(Frame*);
427 BLINK_EXPORT static Frame* ToCoreFrame(const WebFrame&);
432 428
433 bool InShadowTree() const { return scope_ == WebTreeScopeType::kShadow; } 429 bool InShadowTree() const { return scope_ == WebTreeScopeType::kShadow; }
434 430
431 static void InitializeCoreFrame(WebFrame&, Page&);
435 static void TraceFrames(Visitor*, WebFrame*); 432 static void TraceFrames(Visitor*, WebFrame*);
436 #endif 433 #endif
437 434
438 protected: 435 protected:
439 explicit WebFrame(WebTreeScopeType); 436 explicit WebFrame(WebTreeScopeType);
440 virtual ~WebFrame(); 437 virtual ~WebFrame();
441 438
442 // Sets the parent WITHOUT fulling adding it to the frame tree. 439 // Sets the parent WITHOUT fulling adding it to the frame tree.
443 // Used to lie to a local frame that is replacing a remote frame, 440 // Used to lie to a local frame that is replacing a remote frame,
444 // so it can properly start a navigation but wait to swap until 441 // so it can properly start a navigation but wait to swap until
(...skipping 16 matching lines...) Expand all
461 WebFrame* first_child_; 458 WebFrame* first_child_;
462 WebFrame* last_child_; 459 WebFrame* last_child_;
463 460
464 WebFrame* opener_; 461 WebFrame* opener_;
465 std::unique_ptr<OpenedFrameTracker> opened_frame_tracker_; 462 std::unique_ptr<OpenedFrameTracker> opened_frame_tracker_;
466 }; 463 };
467 464
468 } // namespace blink 465 } // namespace blink
469 466
470 #endif 467 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | third_party/WebKit/public/web/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698