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

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

Issue 2887633002: Break dependency on ChromeClientImpl for WebPluginContainerImpl. (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
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.h ('k') | no next file » | 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 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "core/frame/csp/ContentSecurityPolicy.h" 60 #include "core/frame/csp/ContentSecurityPolicy.h"
61 #include "core/html/HTMLFormElement.h" 61 #include "core/html/HTMLFormElement.h"
62 #include "core/html/HTMLPlugInElement.h" 62 #include "core/html/HTMLPlugInElement.h"
63 #include "core/input/EventHandler.h" 63 #include "core/input/EventHandler.h"
64 #include "core/layout/HitTestResult.h" 64 #include "core/layout/HitTestResult.h"
65 #include "core/layout/LayoutBox.h" 65 #include "core/layout/LayoutBox.h"
66 #include "core/layout/LayoutView.h" 66 #include "core/layout/LayoutView.h"
67 #include "core/layout/api/LayoutPartItem.h" 67 #include "core/layout/api/LayoutPartItem.h"
68 #include "core/layout/api/LayoutViewItem.h" 68 #include "core/layout/api/LayoutViewItem.h"
69 #include "core/loader/FrameLoadRequest.h" 69 #include "core/loader/FrameLoadRequest.h"
70 #include "core/page/ChromeClient.h"
70 #include "core/page/FocusController.h" 71 #include "core/page/FocusController.h"
71 #include "core/page/Page.h" 72 #include "core/page/Page.h"
72 #include "core/page/scrolling/ScrollingCoordinator.h" 73 #include "core/page/scrolling/ScrollingCoordinator.h"
73 #include "core/paint/LayoutObjectDrawingRecorder.h" 74 #include "core/paint/LayoutObjectDrawingRecorder.h"
74 #include "core/paint/PaintLayer.h" 75 #include "core/paint/PaintLayer.h"
75 #include "platform/KeyboardCodes.h" 76 #include "platform/KeyboardCodes.h"
76 #include "platform/RuntimeEnabledFeatures.h" 77 #include "platform/RuntimeEnabledFeatures.h"
77 #include "platform/UserGestureIndicator.h" 78 #include "platform/UserGestureIndicator.h"
78 #include "platform/exported/WrappedResourceResponse.h" 79 #include "platform/exported/WrappedResourceResponse.h"
79 #include "platform/geometry/LayoutRect.h" 80 #include "platform/geometry/LayoutRect.h"
(...skipping 18 matching lines...) Expand all
98 #include "public/platform/WebURLError.h" 99 #include "public/platform/WebURLError.h"
99 #include "public/platform/WebURLRequest.h" 100 #include "public/platform/WebURLRequest.h"
100 #include "public/web/WebDOMMessageEvent.h" 101 #include "public/web/WebDOMMessageEvent.h"
101 #include "public/web/WebDocument.h" 102 #include "public/web/WebDocument.h"
102 #include "public/web/WebElement.h" 103 #include "public/web/WebElement.h"
103 #include "public/web/WebFrameClient.h" 104 #include "public/web/WebFrameClient.h"
104 #include "public/web/WebPlugin.h" 105 #include "public/web/WebPlugin.h"
105 #include "public/web/WebPrintParams.h" 106 #include "public/web/WebPrintParams.h"
106 #include "public/web/WebPrintPresetOptions.h" 107 #include "public/web/WebPrintPresetOptions.h"
107 #include "public/web/WebViewClient.h" 108 #include "public/web/WebViewClient.h"
108 #include "web/ChromeClientImpl.h"
109 109
110 namespace blink { 110 namespace blink {
111 111
112 // Public methods -------------------------------------------------------------- 112 // Public methods --------------------------------------------------------------
113 113
114 void WebPluginContainerImpl::SetParent(FrameView* parent) { 114 void WebPluginContainerImpl::SetParent(FrameView* parent) {
115 DCHECK(!parent || !parent_); 115 DCHECK(!parent || !parent_);
116 if (!parent || !parent->IsVisible()) 116 if (!parent || !parent->IsVisible())
117 SetParentVisible(false); 117 SetParentVisible(false);
118 parent_ = parent; 118 parent_ = parent;
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 WebCoalescedInputEvent(transformed_event), 725 WebCoalescedInputEvent(transformed_event),
726 cursor_info) != WebInputEventResult::kNotHandled) 726 cursor_info) != WebInputEventResult::kNotHandled)
727 event->SetDefaultHandled(); 727 event->SetDefaultHandled();
728 728
729 // A windowless plugin can change the cursor in response to a mouse move 729 // A windowless plugin can change the cursor in response to a mouse move
730 // event. We need to reflect the changed cursor in the frame view as the 730 // event. We need to reflect the changed cursor in the frame view as the
731 // mouse is moved in the boundaries of the windowless plugin. 731 // mouse is moved in the boundaries of the windowless plugin.
732 Page* page = parent_view->GetFrame().GetPage(); 732 Page* page = parent_view->GetFrame().GetPage();
733 if (!page) 733 if (!page)
734 return; 734 return;
735 ToChromeClientImpl(page->GetChromeClient()) 735 page->GetChromeClient().SetCursorForPlugin(
736 .SetCursorForPlugin(cursor_info, 736 cursor_info, &parent_view->GetFrame().LocalFrameRoot());
737 &parent_view->GetFrame().LocalFrameRoot());
738 } 737 }
739 738
740 void WebPluginContainerImpl::HandleDragEvent(MouseEvent* event) { 739 void WebPluginContainerImpl::HandleDragEvent(MouseEvent* event) {
741 DCHECK(event->IsDragEvent()); 740 DCHECK(event->IsDragEvent());
742 741
743 WebDragStatus drag_status = kWebDragStatusUnknown; 742 WebDragStatus drag_status = kWebDragStatusUnknown;
744 if (event->type() == EventTypeNames::dragenter) 743 if (event->type() == EventTypeNames::dragenter)
745 drag_status = kWebDragStatusEnter; 744 drag_status = kWebDragStatusEnter;
746 else if (event->type() == EventTypeNames::dragleave) 745 else if (event->type() == EventTypeNames::dragleave)
747 drag_status = kWebDragStatusLeave; 746 drag_status = kWebDragStatusLeave;
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 .GetLayoutViewItem() 1026 .GetLayoutViewItem()
1028 .IsNull()) { 1027 .IsNull()) {
1029 // Take our element and get the clip rect from the enclosing layer and 1028 // Take our element and get the clip rect from the enclosing layer and
1030 // frame view. 1029 // frame view.
1031 ComputeClipRectsForPlugin(element_, window_rect, clip_rect, 1030 ComputeClipRectsForPlugin(element_, window_rect, clip_rect,
1032 unobscured_rect); 1031 unobscured_rect);
1033 } 1032 }
1034 } 1033 }
1035 1034
1036 } // namespace blink 1035 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698