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

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

Issue 2882853006: Move LocalFrameClientImpl to use WebLocalFrameBase instead of WebLocalFrameImpl. (Closed)
Patch Set: 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 void ExtractSmartClipData(WebRect rect_in_viewport, 318 void ExtractSmartClipData(WebRect rect_in_viewport,
319 WebString& clip_text, 319 WebString& clip_text,
320 WebString& clip_html) override; 320 WebString& clip_html) override;
321 321
322 void InitializeCoreFrame(Page&, 322 void InitializeCoreFrame(Page&,
323 FrameOwner*, 323 FrameOwner*,
324 const AtomicString& name) override; 324 const AtomicString& name) override;
325 LocalFrame* GetFrame() const override { return frame_.Get(); } 325 LocalFrame* GetFrame() const override { return frame_.Get(); }
326 326
327 void WillBeDetached(); 327 void WillBeDetached() override;
328 void WillDetachParent(); 328 void WillDetachParent() override;
329 329
330 static WebLocalFrameImpl* Create(WebTreeScopeType, 330 static WebLocalFrameImpl* Create(WebTreeScopeType,
331 WebFrameClient*, 331 WebFrameClient*,
332 blink::InterfaceProvider*, 332 blink::InterfaceProvider*,
333 blink::InterfaceRegistry*, 333 blink::InterfaceRegistry*,
334 WebFrame* opener); 334 WebFrame* opener);
335 static WebLocalFrameImpl* CreateProvisional(WebFrameClient*, 335 static WebLocalFrameImpl* CreateProvisional(WebFrameClient*,
336 blink::InterfaceProvider*, 336 blink::InterfaceProvider*,
337 blink::InterfaceRegistry*, 337 blink::InterfaceRegistry*,
338 WebRemoteFrame*, 338 WebRemoteFrame*,
339 WebSandboxFlags); 339 WebSandboxFlags);
340 ~WebLocalFrameImpl() override; 340 ~WebLocalFrameImpl() override;
341 341
342 LocalFrame* CreateChildFrame(const FrameLoadRequest&, 342 LocalFrame* CreateChildFrame(const FrameLoadRequest&,
343 const AtomicString& name, 343 const AtomicString& name,
344 HTMLFrameOwnerElement*); 344 HTMLFrameOwnerElement*) override;
345 345
346 void DidChangeContentsSize(const IntSize&); 346 void DidChangeContentsSize(const IntSize&);
347 347
348 void CreateFrameView(); 348 void CreateFrameView() override;
349 349
350 static WebLocalFrameImpl* FromFrame(LocalFrame*); 350 static WebLocalFrameImpl* FromFrame(LocalFrame*);
351 static WebLocalFrameImpl* FromFrame(LocalFrame&); 351 static WebLocalFrameImpl* FromFrame(LocalFrame&);
352 static WebLocalFrameImpl* FromFrameOwnerElement(Element*); 352 static WebLocalFrameImpl* FromFrameOwnerElement(Element*);
353 353
354 // If the frame hosts a PluginDocument, this method returns the 354 // If the frame hosts a PluginDocument, this method returns the
355 // WebPluginContainerImpl that hosts the plugin. 355 // WebPluginContainerImpl that hosts the plugin.
356 static WebPluginContainerImpl* PluginContainerFromFrame(LocalFrame*); 356 static WebPluginContainerImpl* PluginContainerFromFrame(LocalFrame*);
357 357
358 // If the frame hosts a PluginDocument, this method returns the 358 // If the frame hosts a PluginDocument, this method returns the
(...skipping 19 matching lines...) Expand all
378 WebDataSourceImpl* ProvisionalDataSourceImpl() const; 378 WebDataSourceImpl* ProvisionalDataSourceImpl() const;
379 379
380 // When a Find operation ends, we want to set the selection to what was active 380 // When a Find operation ends, we want to set the selection to what was active
381 // and set focus to the first focusable node we find (starting with the first 381 // and set focus to the first focusable node we find (starting with the first
382 // node in the matched range and going up the inheritance chain). If we find 382 // node in the matched range and going up the inheritance chain). If we find
383 // nothing to focus we focus the first focusable node in the range. This 383 // nothing to focus we focus the first focusable node in the range. This
384 // allows us to set focus to a link (when we find text inside a link), which 384 // allows us to set focus to a link (when we find text inside a link), which
385 // allows us to navigate by pressing Enter after closing the Find box. 385 // allows us to navigate by pressing Enter after closing the Find box.
386 void SetFindEndstateFocusAndSelection(); 386 void SetFindEndstateFocusAndSelection();
387 387
388 void DidFail(const ResourceError&, bool was_provisional, HistoryCommitType); 388 void DidFail(const ResourceError&,
389 void DidFinish(); 389 bool was_provisional,
390 HistoryCommitType) override;
391 void DidFinish() override;
390 392
391 // Sets whether the WebLocalFrameImpl allows its document to be scrolled. 393 // Sets whether the WebLocalFrameImpl allows its document to be scrolled.
392 // If the parameter is true, allow the document to be scrolled. 394 // If the parameter is true, allow the document to be scrolled.
393 // Otherwise, disallow scrolling. 395 // Otherwise, disallow scrolling.
394 void SetCanHaveScrollbars(bool) override; 396 void SetCanHaveScrollbars(bool) override;
395 397
396 WebFrameClient* Client() const override { return client_; } 398 WebFrameClient* Client() const override { return client_; }
397 void SetClient(WebFrameClient* client) override { client_ = client; } 399 void SetClient(WebFrameClient* client) override { client_ = client; }
398 400
399 ContentSettingsClient& GetContentSettingsClient() { 401 ContentSettingsClient& GetContentSettingsClient() override {
400 return content_settings_client_; 402 return content_settings_client_;
401 } 403 };
402 404
403 SharedWorkerRepositoryClientImpl* SharedWorkerRepositoryClient() const { 405 SharedWorkerRepositoryClientImpl* SharedWorkerRepositoryClient()
406 const override {
404 return shared_worker_repository_client_.get(); 407 return shared_worker_repository_client_.get();
405 } 408 }
406 409
407 void SetInputEventsTransformForEmulation(const IntSize&, float); 410 void SetInputEventsTransformForEmulation(const IntSize&, float);
408 411
409 static void SelectWordAroundPosition(LocalFrame*, VisiblePosition); 412 static void SelectWordAroundPosition(LocalFrame*, VisiblePosition);
410 413
411 TextCheckerClient& GetTextCheckerClient() const; 414 TextCheckerClient& GetTextCheckerClient() const override;
412 WebTextCheckClient* TextCheckClient() const override { 415 WebTextCheckClient* TextCheckClient() const override {
413 return text_check_client_; 416 return text_check_client_;
414 } 417 }
415 418
416 TextFinder* GetTextFinder() const; 419 TextFinder* GetTextFinder() const;
417 // Returns the text finder object if it already exists. 420 // Returns the text finder object if it already exists.
418 // Otherwise creates it and then returns. 421 // Otherwise creates it and then returns.
419 TextFinder& EnsureTextFinder() override; 422 TextFinder& EnsureTextFinder() override;
420 423
421 // Returns a hit-tested VisiblePosition for the given point 424 // Returns a hit-tested VisiblePosition for the given point
422 VisiblePosition VisiblePositionForViewportPoint(const WebPoint&); 425 VisiblePosition VisiblePositionForViewportPoint(const WebPoint&);
423 426
424 void SetFrameWidget(WebFrameWidgetBase*) override; 427 void SetFrameWidget(WebFrameWidgetBase*) override;
425 428
426 // DevTools front-end bindings. 429 // DevTools front-end bindings.
427 void SetDevToolsFrontend(WebDevToolsFrontendImpl* frontend) { 430 void SetDevToolsFrontend(WebDevToolsFrontendImpl* frontend) override {
428 web_dev_tools_frontend_ = frontend; 431 web_dev_tools_frontend_ = frontend;
429 } 432 }
430 WebDevToolsFrontendImpl* DevToolsFrontend() { 433 WebDevToolsFrontendImpl* DevToolsFrontend() override {
431 return web_dev_tools_frontend_; 434 return web_dev_tools_frontend_;
432 } 435 }
433 436
434 WebNode ContextMenuNode() const { return context_menu_node_.Get(); } 437 WebNode ContextMenuNode() const { return context_menu_node_.Get(); }
435 void SetContextMenuNode(Node* node) override { context_menu_node_ = node; } 438 void SetContextMenuNode(Node* node) override { context_menu_node_ = node; }
436 void ClearContextMenuNode() override { context_menu_node_.Clear(); } 439 void ClearContextMenuNode() override { context_menu_node_.Clear(); }
437 440
438 std::unique_ptr<WebURLLoader> CreateURLLoader() override; 441 std::unique_ptr<WebURLLoader> CreateURLLoader() override;
439 442
440 DECLARE_VIRTUAL_TRACE(); 443 DECLARE_VIRTUAL_TRACE();
(...skipping 11 matching lines...) Expand all
452 blink::InterfaceRegistry*); 455 blink::InterfaceRegistry*);
453 456
454 // Inherited from WebFrame, but intentionally hidden: it never makes sense 457 // Inherited from WebFrame, but intentionally hidden: it never makes sense
455 // to call these on a WebLocalFrameImpl. 458 // to call these on a WebLocalFrameImpl.
456 bool IsWebLocalFrame() const override; 459 bool IsWebLocalFrame() const override;
457 WebLocalFrame* ToWebLocalFrame() override; 460 WebLocalFrame* ToWebLocalFrame() override;
458 bool IsWebRemoteFrame() const override; 461 bool IsWebRemoteFrame() const override;
459 WebRemoteFrame* ToWebRemoteFrame() override; 462 WebRemoteFrame* ToWebRemoteFrame() override;
460 463
461 // Sets the local core frame and registers destruction observers. 464 // Sets the local core frame and registers destruction observers.
462 void SetCoreFrame(LocalFrame*); 465 void SetCoreFrame(LocalFrame*) override;
463 466
464 void LoadJavaScriptURL(const KURL&); 467 void LoadJavaScriptURL(const KURL&);
465 468
466 HitTestResult HitTestResultForVisualViewportPos(const IntPoint&); 469 HitTestResult HitTestResultForVisualViewportPos(const IntPoint&);
467 470
468 WebPlugin* FocusedPluginIfInputMethodSupported(); 471 WebPlugin* FocusedPluginIfInputMethodSupported();
469 ScrollableArea* LayoutViewportScrollableArea() const; 472 ScrollableArea* LayoutViewportScrollableArea() const;
470 473
471 // Returns true if the frame is focused. 474 // Returns true if the frame is focused.
472 bool IsFocused() const; 475 bool IsFocused() const;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 528
526 DEFINE_TYPE_CASTS(WebLocalFrameImpl, 529 DEFINE_TYPE_CASTS(WebLocalFrameImpl,
527 WebFrame, 530 WebFrame,
528 frame, 531 frame,
529 frame->IsWebLocalFrame(), 532 frame->IsWebLocalFrame(),
530 frame.IsWebLocalFrame()); 533 frame.IsWebLocalFrame());
531 534
532 } // namespace blink 535 } // namespace blink
533 536
534 #endif 537 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebDevToolsFrontendImpl.cpp ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698