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

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

Issue 2888203006: Move the logic to retrieve the WebPluginContainer to LocalFrame and Node. (Closed)
Patch Set: Rename & format. 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 HTMLFrameOwnerElement*) override; 344 HTMLFrameOwnerElement*) override;
345 345
346 void DidChangeContentsSize(const IntSize&); 346 void DidChangeContentsSize(const IntSize&);
347 347
348 void CreateFrameView() override; 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
355 // WebPluginContainerBase that hosts the plugin.
356 static WebPluginContainerBase* PluginContainerFromFrame(LocalFrame*);
357
358 // If the frame hosts a PluginDocument, this method returns the
359 // WebPluginContainerBase that hosts the plugin. If the provided node is a
360 // plugin, then it runs its WebPluginContainerBase. Otherwise, uses the
361 // currently focused element (if any).
362 static WebPluginContainerBase* CurrentPluginContainer(LocalFrame*,
363 Node* = nullptr);
364
365 WebViewBase* ViewImpl() const override; 354 WebViewBase* ViewImpl() const override;
366 355
367 FrameView* GetFrameView() const override { 356 FrameView* GetFrameView() const override {
368 return GetFrame() ? GetFrame()->View() : 0; 357 return GetFrame() ? GetFrame()->View() : 0;
369 } 358 }
370 359
371 WebDevToolsAgentImpl* DevToolsAgentImpl() const override { 360 WebDevToolsAgentImpl* DevToolsAgentImpl() const override {
372 return dev_tools_agent_.Get(); 361 return dev_tools_agent_.Get();
373 } 362 }
374 363
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 452
464 // Sets the local core frame and registers destruction observers. 453 // Sets the local core frame and registers destruction observers.
465 void SetCoreFrame(LocalFrame*) override; 454 void SetCoreFrame(LocalFrame*) override;
466 455
467 void LoadJavaScriptURL(const KURL&); 456 void LoadJavaScriptURL(const KURL&);
468 457
469 HitTestResult HitTestResultForVisualViewportPos(const IntPoint&); 458 HitTestResult HitTestResultForVisualViewportPos(const IntPoint&);
470 459
471 WebPlugin* FocusedPluginIfInputMethodSupported(); 460 WebPlugin* FocusedPluginIfInputMethodSupported();
472 ScrollableArea* LayoutViewportScrollableArea() const; 461 ScrollableArea* LayoutViewportScrollableArea() const;
462 WebPluginContainerBase* CurrentPluginContainer(LocalFrame*,
463 Node* = nullptr) const;
473 464
474 // Returns true if the frame is focused. 465 // Returns true if the frame is focused.
475 bool IsFocused() const; 466 bool IsFocused() const;
476 467
477 Member<LocalFrameClientImpl> local_frame_client_impl_; 468 Member<LocalFrameClientImpl> local_frame_client_impl_;
478 469
479 // The embedder retains a reference to the WebCore LocalFrame while it is 470 // The embedder retains a reference to the WebCore LocalFrame while it is
480 // active in the DOM. This reference is released when the frame is removed 471 // active in the DOM. This reference is released when the frame is removed
481 // from the DOM or the entire page is closed. FIXME: These will need to 472 // from the DOM or the entire page is closed. FIXME: These will need to
482 // change to WebFrame when we introduce WebFrameProxy. 473 // change to WebFrame when we introduce WebFrameProxy.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 519
529 DEFINE_TYPE_CASTS(WebLocalFrameImpl, 520 DEFINE_TYPE_CASTS(WebLocalFrameImpl,
530 WebFrame, 521 WebFrame,
531 frame, 522 frame,
532 frame->IsWebLocalFrame(), 523 frame->IsWebLocalFrame(),
533 frame.IsWebLocalFrame()); 524 frame.IsWebLocalFrame());
534 525
535 } // namespace blink 526 } // namespace blink
536 527
537 #endif 528 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698