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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp

Issue 2810593002: Set plugin focus by implementing HTMLPlugInElement::SetFocused. (Closed)
Patch Set: HTMLFrameOwnerElement::SetFocused rather than Node::SetFocused Created 3 years, 8 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/core/html/HTMLPlugInElement.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 void HTMLPlugInElement::SetPersistedPlugin(PluginView* plugin) { 148 void HTMLPlugInElement::SetPersistedPlugin(PluginView* plugin) {
149 if (persisted_plugin_ == plugin) 149 if (persisted_plugin_ == plugin)
150 return; 150 return;
151 if (persisted_plugin_) { 151 if (persisted_plugin_) {
152 persisted_plugin_->Hide(); 152 persisted_plugin_->Hide();
153 DisposeWidgetSoon(persisted_plugin_.Release()); 153 DisposeWidgetSoon(persisted_plugin_.Release());
154 } 154 }
155 persisted_plugin_ = plugin; 155 persisted_plugin_ = plugin;
156 } 156 }
157 157
158 void HTMLPlugInElement::SetFocused(bool focused) {
159 // Set focus as kWebFocusTypeNone. The WebFocusType does not matter since
160 // it is not sent to the plugin in pepper_webplugin_impl::UpdateFocus.
161 if (plugin_)
162 plugin_->SetFocused(focused, kWebFocusTypeNone);
dcheng 2017/04/11 05:36:55 Can we remove the second argument?
joelhockey 2017/04/11 07:08:23 Done, also removed WebFocusType from the trail of
163 HTMLFrameOwnerElement::SetFocused(focused);
164 }
165
158 bool HTMLPlugInElement::RequestObjectInternal( 166 bool HTMLPlugInElement::RequestObjectInternal(
159 const String& url, 167 const String& url,
160 const String& mime_type, 168 const String& mime_type,
161 const Vector<String>& param_names, 169 const Vector<String>& param_names,
162 const Vector<String>& param_values) { 170 const Vector<String>& param_values) {
163 if (url.IsEmpty() && mime_type.IsEmpty()) 171 if (url.IsEmpty() && mime_type.IsEmpty())
164 return false; 172 return false;
165 173
166 if (ProtocolIsJavaScript(url)) 174 if (ProtocolIsJavaScript(url))
167 return false; 175 return false;
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 707
700 void HTMLPlugInElement::LazyReattachIfNeeded() { 708 void HTMLPlugInElement::LazyReattachIfNeeded() {
701 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() && 709 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() &&
702 !IsImageType()) { 710 !IsImageType()) {
703 LazyReattachIfAttached(); 711 LazyReattachIfAttached();
704 SetPersistedPlugin(nullptr); 712 SetPersistedPlugin(nullptr);
705 } 713 }
706 } 714 }
707 715
708 } // namespace blink 716 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPlugInElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698