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

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

Issue 625073002: Merge RenderWidget into single subclass, RenderPart (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 6 years, 2 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/WebNode.cpp ('k') | Source/web/tests/ScrollingCoordinatorChromiumTest.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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 #include "core/page/DragSession.h" 73 #include "core/page/DragSession.h"
74 #include "core/page/EventHandler.h" 74 #include "core/page/EventHandler.h"
75 #include "core/page/FocusController.h" 75 #include "core/page/FocusController.h"
76 #include "core/page/FrameTree.h" 76 #include "core/page/FrameTree.h"
77 #include "core/page/InjectedStyleSheets.h" 77 #include "core/page/InjectedStyleSheets.h"
78 #include "core/page/Page.h" 78 #include "core/page/Page.h"
79 #include "core/page/PagePopupClient.h" 79 #include "core/page/PagePopupClient.h"
80 #include "core/page/PointerLockController.h" 80 #include "core/page/PointerLockController.h"
81 #include "core/page/ScopedPageLoadDeferrer.h" 81 #include "core/page/ScopedPageLoadDeferrer.h"
82 #include "core/page/TouchDisambiguation.h" 82 #include "core/page/TouchDisambiguation.h"
83 #include "core/rendering/RenderPart.h"
83 #include "core/rendering/RenderView.h" 84 #include "core/rendering/RenderView.h"
84 #include "core/rendering/RenderWidget.h"
85 #include "core/rendering/TextAutosizer.h" 85 #include "core/rendering/TextAutosizer.h"
86 #include "core/rendering/compositing/RenderLayerCompositor.h" 86 #include "core/rendering/compositing/RenderLayerCompositor.h"
87 #include "modules/credentialmanager/CredentialManagerClient.h" 87 #include "modules/credentialmanager/CredentialManagerClient.h"
88 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" 88 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h"
89 #include "modules/encryptedmedia/MediaKeysController.h" 89 #include "modules/encryptedmedia/MediaKeysController.h"
90 #include "modules/filesystem/InspectorFileSystemAgent.h" 90 #include "modules/filesystem/InspectorFileSystemAgent.h"
91 #include "modules/indexeddb/InspectorIndexedDBAgent.h" 91 #include "modules/indexeddb/InspectorIndexedDBAgent.h"
92 #include "modules/push_messaging/PushController.h" 92 #include "modules/push_messaging/PushController.h"
93 #include "platform/ContextMenu.h" 93 #include "platform/ContextMenu.h"
94 #include "platform/ContextMenuItem.h" 94 #include "platform/ContextMenuItem.h"
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 if (!pinchVirtualViewportEnabled()) 1654 if (!pinchVirtualViewportEnabled())
1655 return; 1655 return;
1656 1656
1657 page()->frameHost().pinchViewport().setSize(newSize); 1657 page()->frameHost().pinchViewport().setSize(newSize);
1658 } 1658 }
1659 1659
1660 WebLocalFrameImpl* WebViewImpl::localFrameRootTemporary() const 1660 WebLocalFrameImpl* WebViewImpl::localFrameRootTemporary() const
1661 { 1661 {
1662 // FIXME: This is a temporary method that finds the first localFrame in a tr aversal. 1662 // FIXME: This is a temporary method that finds the first localFrame in a tr aversal.
1663 // This is equivalent to mainFrame() if the mainFrame is in-process. We need to create 1663 // This is equivalent to mainFrame() if the mainFrame is in-process. We need to create
1664 // separate WebWidgets to be created by RenderWidgets, which are associated with *all* 1664 // separate WebWidgets to be created by RenderParts, which are associated wi th *all*
1665 // local frame roots, not just the first one in the tree. Until then, this l imits us 1665 // local frame roots, not just the first one in the tree. Until then, this l imits us
1666 // to having only one functioning connected LocalFrame subtree per process. 1666 // to having only one functioning connected LocalFrame subtree per process.
1667 for (Frame* frame = page()->mainFrame(); frame; frame = frame->tree().traver seNext()) { 1667 for (Frame* frame = page()->mainFrame(); frame; frame = frame->tree().traver seNext()) {
1668 if (frame->isLocalRoot()) 1668 if (frame->isLocalRoot())
1669 return WebLocalFrameImpl::fromFrame(toLocalFrame(frame)); 1669 return WebLocalFrameImpl::fromFrame(toLocalFrame(frame));
1670 } 1670 }
1671 return 0; 1671 return 0;
1672 } 1672 }
1673 1673
1674 void WebViewImpl::performResize() 1674 void WebViewImpl::performResize()
(...skipping 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after
3382 3382
3383 void WebViewImpl::performPluginAction(const WebPluginAction& action, 3383 void WebViewImpl::performPluginAction(const WebPluginAction& action,
3384 const WebPoint& location) 3384 const WebPoint& location)
3385 { 3385 {
3386 HitTestResult result = hitTestResultForWindowPos(location); 3386 HitTestResult result = hitTestResultForWindowPos(location);
3387 RefPtrWillBeRawPtr<Node> node = result.innerNonSharedNode(); 3387 RefPtrWillBeRawPtr<Node> node = result.innerNonSharedNode();
3388 if (!isHTMLObjectElement(*node) && !isHTMLEmbedElement(*node)) 3388 if (!isHTMLObjectElement(*node) && !isHTMLEmbedElement(*node))
3389 return; 3389 return;
3390 3390
3391 RenderObject* object = node->renderer(); 3391 RenderObject* object = node->renderer();
3392 if (object && object->isWidget()) { 3392 if (object && object->isRenderPart()) {
3393 Widget* widget = toRenderWidget(object)->widget(); 3393 Widget* widget = toRenderPart(object)->widget();
3394 if (widget && widget->isPluginContainer()) { 3394 if (widget && widget->isPluginContainer()) {
3395 WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget); 3395 WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget);
3396 switch (action.type) { 3396 switch (action.type) {
3397 case WebPluginAction::Rotate90Clockwise: 3397 case WebPluginAction::Rotate90Clockwise:
3398 plugin->plugin()->rotateView(WebPlugin::RotationType90Clockwise) ; 3398 plugin->plugin()->rotateView(WebPlugin::RotationType90Clockwise) ;
3399 break; 3399 break;
3400 case WebPluginAction::Rotate90Counterclockwise: 3400 case WebPluginAction::Rotate90Counterclockwise:
3401 plugin->plugin()->rotateView(WebPlugin::RotationType90Counterclo ckwise); 3401 plugin->plugin()->rotateView(WebPlugin::RotationType90Counterclo ckwise);
3402 break; 3402 break;
3403 default: 3403 default:
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
4443 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4443 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4444 4444
4445 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4445 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4446 return false; 4446 return false;
4447 4447
4448 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4448 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4449 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4449 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4450 } 4450 }
4451 4451
4452 } // namespace blink 4452 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebNode.cpp ('k') | Source/web/tests/ScrollingCoordinatorChromiumTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698