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

Side by Side Diff: Source/web/WebFrameImpl.h

Issue 23506013: Make the embedder responsible for creating the WebFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add WebViewHelper for unittests. Created 7 years, 3 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 template <typename T> class WebVector; 70 template <typename T> class WebVector;
71 71
72 // Implementation of WebFrame, note that this is a reference counted object. 72 // Implementation of WebFrame, note that this is a reference counted object.
73 class WebFrameImpl 73 class WebFrameImpl
74 : public WebFrame 74 : public WebFrame
75 , public RefCounted<WebFrameImpl> 75 , public RefCounted<WebFrameImpl>
76 , public WebCore::FrameDestructionObserver { 76 , public WebCore::FrameDestructionObserver {
77 public: 77 public:
78 // WebFrame methods: 78 // WebFrame methods:
79 virtual void close();
79 virtual WebString uniqueName() const; 80 virtual WebString uniqueName() const;
80 virtual WebString assignedName() const; 81 virtual WebString assignedName() const;
81 virtual void setName(const WebString&); 82 virtual void setName(const WebString&);
82 virtual long long identifier() const; 83 virtual long long identifier() const;
83 virtual WebVector<WebIconURL> iconURLs(int iconTypesMask) const; 84 virtual WebVector<WebIconURL> iconURLs(int iconTypesMask) const;
84 virtual WebSize scrollOffset() const; 85 virtual WebSize scrollOffset() const;
85 virtual void setScrollOffset(const WebSize&); 86 virtual void setScrollOffset(const WebSize&);
86 virtual WebSize minimumScrollOffset() const; 87 virtual WebSize minimumScrollOffset() const;
87 virtual WebSize maximumScrollOffset() const; 88 virtual WebSize maximumScrollOffset() const;
88 virtual WebSize contentsSize() const; 89 virtual WebSize contentsSize() const;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 virtual WebString renderTreeAsText(RenderAsTextControls toShow = RenderAsTex tNormal) const; 233 virtual WebString renderTreeAsText(RenderAsTextControls toShow = RenderAsTex tNormal) const;
233 virtual WebString markerTextForListItem(const WebElement&) const; 234 virtual WebString markerTextForListItem(const WebElement&) const;
234 virtual WebRect selectionBoundsRect() const; 235 virtual WebRect selectionBoundsRect() const;
235 236
236 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const; 237 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const;
237 virtual WebString layerTreeAsText(bool showDebugInfo = false) const; 238 virtual WebString layerTreeAsText(bool showDebugInfo = false) const;
238 239
239 // WebCore::FrameDestructionObserver methods. 240 // WebCore::FrameDestructionObserver methods.
240 virtual void willDetachPage(); 241 virtual void willDetachPage();
241 242
242 static PassRefPtr<WebFrameImpl> create(WebFrameClient* client); 243 static WebFrameImpl* create(WebFrameClient*, long long identifier);
243 virtual ~WebFrameImpl(); 244 virtual ~WebFrameImpl();
244 245
245 // Called by the WebViewImpl to initialize the main frame for the page. 246 // Called by the WebViewImpl to initialize the main frame for the page.
246 void initializeAsMainFrame(WebCore::Page*); 247 void initializeAsMainFrame(WebCore::Page*);
247 248
248 PassRefPtr<WebCore::Frame> createChildFrame( 249 PassRefPtr<WebCore::Frame> createChildFrame(
249 const WebCore::FrameLoadRequest&, WebCore::HTMLFrameOwnerElement*); 250 const WebCore::FrameLoadRequest&, WebCore::HTMLFrameOwnerElement*);
250 251
251 void didChangeContentsSize(const WebCore::IntSize&); 252 void didChangeContentsSize(const WebCore::IntSize&);
252 253
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 }; 322 };
322 323
323 // A bit mask specifying area of the frame to invalidate. 324 // A bit mask specifying area of the frame to invalidate.
324 enum AreaToInvalidate { 325 enum AreaToInvalidate {
325 InvalidateNothing, 326 InvalidateNothing,
326 InvalidateContentArea, 327 InvalidateContentArea,
327 InvalidateScrollbar, // Vertical scrollbar only. 328 InvalidateScrollbar, // Vertical scrollbar only.
328 InvalidateAll // Both content area and the scrollbar. 329 InvalidateAll // Both content area and the scrollbar.
329 }; 330 };
330 331
331 explicit WebFrameImpl(WebFrameClient*); 332 explicit WebFrameImpl(WebFrameClient*, long long frame_identifier);
332 333
333 // Sets the local WebCore frame and registers destruction observers. 334 // Sets the local WebCore frame and registers destruction observers.
334 void setWebCoreFrame(WebCore::Frame*); 335 void setWebCoreFrame(WebCore::Frame*);
335 336
336 // Notifies the delegate about a new selection rect. 337 // Notifies the delegate about a new selection rect.
337 void reportFindInPageSelection( 338 void reportFindInPageSelection(
338 const WebRect& selectionRect, int activeMatchOrdinal, int identifier); 339 const WebRect& selectionRect, int activeMatchOrdinal, int identifier);
339 340
340 // Clear the find-in-page matches cache forcing rects to be fully 341 // Clear the find-in-page matches cache forcing rects to be fully
341 // calculated again next time updateFindMatchRects is called. 342 // calculated again next time updateFindMatchRects is called.
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 { 509 {
509 return static_cast<const WebFrameImpl*>(webFrame); 510 return static_cast<const WebFrameImpl*>(webFrame);
510 } 511 }
511 512
512 // This will catch anyone doing an unnecessary cast. 513 // This will catch anyone doing an unnecessary cast.
513 void toWebFrameImpl(const WebFrameImpl*); 514 void toWebFrameImpl(const WebFrameImpl*);
514 515
515 } // namespace WebKit 516 } // namespace WebKit
516 517
517 #endif 518 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698