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

Side by Side Diff: Source/web/WebPluginContainerImpl.cpp

Issue 23728003: Return Frame&, not Frame* from RenderView::frame() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed PopupMenuTest build 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebDevToolsAgentImpl.cpp ('k') | Source/web/tests/PopupMenuTest.cpp » ('j') | 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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 m_scrollbarGroup->scrollAnimator()->mouseExitedContentArea(); 690 m_scrollbarGroup->scrollAnimator()->mouseExitedContentArea();
691 } 691 }
692 692
693 WebCursorInfo cursorInfo; 693 WebCursorInfo cursorInfo;
694 if (m_webPlugin->handleInputEvent(webEvent, cursorInfo)) 694 if (m_webPlugin->handleInputEvent(webEvent, cursorInfo))
695 event->setDefaultHandled(); 695 event->setDefaultHandled();
696 696
697 // A windowless plugin can change the cursor in response to a mouse move 697 // A windowless plugin can change the cursor in response to a mouse move
698 // event. We need to reflect the changed cursor in the frame view as the 698 // event. We need to reflect the changed cursor in the frame view as the
699 // mouse is moved in the boundaries of the windowless plugin. 699 // mouse is moved in the boundaries of the windowless plugin.
700 Page* page = parentView->frame()->page(); 700 Page* page = parentView->frame().page();
701 if (!page) 701 if (!page)
702 return; 702 return;
703 ChromeClientImpl* chromeClient = static_cast<ChromeClientImpl*>(&page->chrom e().client()); 703 ChromeClientImpl* chromeClient = static_cast<ChromeClientImpl*>(&page->chrom e().client());
704 chromeClient->setCursorForPlugin(cursorInfo); 704 chromeClient->setCursorForPlugin(cursorInfo);
705 } 705 }
706 706
707 void WebPluginContainerImpl::handleDragEvent(MouseEvent* event) 707 void WebPluginContainerImpl::handleDragEvent(MouseEvent* event)
708 { 708 {
709 ASSERT(event->isDragEvent()); 709 ASSERT(event->isDragEvent());
710 710
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 if (webEvent.type == WebInputEvent::Undefined) 845 if (webEvent.type == WebInputEvent::Undefined)
846 return; 846 return;
847 847
848 WebCursorInfo cursorInfo; 848 WebCursorInfo cursorInfo;
849 if (m_webPlugin->handleInputEvent(webEvent, cursorInfo)) 849 if (m_webPlugin->handleInputEvent(webEvent, cursorInfo))
850 event->setDefaultHandled(); 850 event->setDefaultHandled();
851 } 851 }
852 852
853 void WebPluginContainerImpl::focusPlugin() 853 void WebPluginContainerImpl::focusPlugin()
854 { 854 {
855 Frame* containingFrame = static_cast<FrameView*>(parent())->frame(); 855 Frame& containingFrame = static_cast<FrameView*>(parent())->frame();
856 if (Page* currentPage = containingFrame->page()) 856 if (Page* currentPage = containingFrame.page())
857 currentPage->focusController().setFocusedElement(m_element, containingFr ame); 857 currentPage->focusController().setFocusedElement(m_element, &containingF rame);
858 else 858 else
859 containingFrame->document()->setFocusedElement(m_element); 859 containingFrame.document()->setFocusedElement(m_element);
860 } 860 }
861 861
862 void WebPluginContainerImpl::calculateGeometry(const IntRect& frameRect, 862 void WebPluginContainerImpl::calculateGeometry(const IntRect& frameRect,
863 IntRect& windowRect, 863 IntRect& windowRect,
864 IntRect& clipRect, 864 IntRect& clipRect,
865 Vector<IntRect>& cutOutRects) 865 Vector<IntRect>& cutOutRects)
866 { 866 {
867 windowRect = parent()->contentsToWindow(frameRect); 867 windowRect = parent()->contentsToWindow(frameRect);
868 868
869 // Calculate a clip-rect so that we don't overlap the scrollbars, etc. 869 // Calculate a clip-rect so that we don't overlap the scrollbars, etc.
(...skipping 18 matching lines...) Expand all
888 // Take our element and get the clip rect from the enclosing layer and 888 // Take our element and get the clip rect from the enclosing layer and
889 // frame view. 889 // frame view.
890 clipRect.intersect( 890 clipRect.intersect(
891 m_element->document().view()->windowClipRectForFrameOwner(m_element, true)); 891 m_element->document().view()->windowClipRectForFrameOwner(m_element, true));
892 } 892 }
893 893
894 return clipRect; 894 return clipRect;
895 } 895 }
896 896
897 } // namespace WebKit 897 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebDevToolsAgentImpl.cpp ('k') | Source/web/tests/PopupMenuTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698