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

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

Issue 2855123003: Remove rendundant WebLocalFrame parameter in various plugin code. (Closed)
Patch Set: Fix Android 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, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. 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 13 matching lines...) Expand all
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 #include "web/LocalFrameClientImpl.h" 32 #include "web/LocalFrameClientImpl.h"
33 33
34 #include <memory>
35
34 #include "bindings/core/v8/ScriptController.h" 36 #include "bindings/core/v8/ScriptController.h"
35 #include "core/HTMLNames.h" 37 #include "core/HTMLNames.h"
36 #include "core/dom/Document.h" 38 #include "core/dom/Document.h"
37 #include "core/dom/Fullscreen.h" 39 #include "core/dom/Fullscreen.h"
38 #include "core/events/MessageEvent.h" 40 #include "core/events/MessageEvent.h"
39 #include "core/events/MouseEvent.h" 41 #include "core/events/MouseEvent.h"
40 #include "core/events/UIEventWithKeyState.h" 42 #include "core/events/UIEventWithKeyState.h"
41 #include "core/exported/SharedWorkerRepositoryClientImpl.h" 43 #include "core/exported/SharedWorkerRepositoryClientImpl.h"
42 #include "core/exported/WebDataSourceImpl.h" 44 #include "core/exported/WebDataSourceImpl.h"
43 #include "core/exported/WebViewBase.h" 45 #include "core/exported/WebViewBase.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #include "public/web/WebPlugin.h" 102 #include "public/web/WebPlugin.h"
101 #include "public/web/WebPluginParams.h" 103 #include "public/web/WebPluginParams.h"
102 #include "public/web/WebViewClient.h" 104 #include "public/web/WebViewClient.h"
103 #include "v8/include/v8.h" 105 #include "v8/include/v8.h"
104 #include "web/DevToolsEmulator.h" 106 #include "web/DevToolsEmulator.h"
105 #include "web/WebDevToolsAgentImpl.h" 107 #include "web/WebDevToolsAgentImpl.h"
106 #include "web/WebDevToolsFrontendImpl.h" 108 #include "web/WebDevToolsFrontendImpl.h"
107 #include "web/WebLocalFrameImpl.h" 109 #include "web/WebLocalFrameImpl.h"
108 #include "web/WebPluginContainerImpl.h" 110 #include "web/WebPluginContainerImpl.h"
109 111
110 #include <memory>
111
112 namespace blink { 112 namespace blink {
113 113
114 namespace { 114 namespace {
115 115
116 // Convenience helper for frame tree helpers in FrameClient to reduce the amount 116 // Convenience helper for frame tree helpers in FrameClient to reduce the amount
117 // of null-checking boilerplate code. Since the frame tree is maintained in the 117 // of null-checking boilerplate code. Since the frame tree is maintained in the
118 // web/ layer, the frame tree helpers often have to deal with null WebFrames: 118 // web/ layer, the frame tree helpers often have to deal with null WebFrames:
119 // for example, a frame with no parent will return null for WebFrame::parent(). 119 // for example, a frame with no parent will return null for WebFrame::parent().
120 // TODO(dcheng): Remove duplication between LocalFrameClientImpl and 120 // TODO(dcheng): Remove duplication between LocalFrameClientImpl and
121 // RemoteFrameClientImpl somehow... 121 // RemoteFrameClientImpl somehow...
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 if (!web_frame_->Client()) 726 if (!web_frame_->Client())
727 return nullptr; 727 return nullptr;
728 728
729 WebPluginParams params; 729 WebPluginParams params;
730 params.url = url; 730 params.url = url;
731 params.mime_type = mime_type; 731 params.mime_type = mime_type;
732 params.attribute_names = param_names; 732 params.attribute_names = param_names;
733 params.attribute_values = param_values; 733 params.attribute_values = param_values;
734 params.load_manually = load_manually; 734 params.load_manually = load_manually;
735 735
736 WebPlugin* web_plugin = 736 WebPlugin* web_plugin = web_frame_->Client()->CreatePlugin(params);
737 web_frame_->Client()->CreatePlugin(web_frame_, params);
738 if (!web_plugin) 737 if (!web_plugin)
739 return nullptr; 738 return nullptr;
740 739
741 // The container takes ownership of the WebPlugin. 740 // The container takes ownership of the WebPlugin.
742 WebPluginContainerImpl* container = 741 WebPluginContainerImpl* container =
743 WebPluginContainerImpl::Create(element, web_plugin); 742 WebPluginContainerImpl::Create(element, web_plugin);
744 743
745 if (!web_plugin->Initialize(container)) 744 if (!web_plugin->Initialize(container))
746 return nullptr; 745 return nullptr;
747 746
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 void LocalFrameClientImpl::AbortClientNavigation() { 1004 void LocalFrameClientImpl::AbortClientNavigation() {
1006 if (web_frame_->Client()) 1005 if (web_frame_->Client())
1007 web_frame_->Client()->AbortClientNavigation(); 1006 web_frame_->Client()->AbortClientNavigation();
1008 } 1007 }
1009 1008
1010 TextCheckerClient& LocalFrameClientImpl::GetTextCheckerClient() const { 1009 TextCheckerClient& LocalFrameClientImpl::GetTextCheckerClient() const {
1011 return web_frame_->GetTextCheckerClient(); 1010 return web_frame_->GetTextCheckerClient();
1012 } 1011 }
1013 1012
1014 } // namespace blink 1013 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698