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

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

Issue 2810593002: Set plugin focus by implementing HTMLPlugInElement::SetFocused. (Closed)
Patch Set: fix comments 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
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, WebFocusType focus_type) {
159 if (plugin_)
160 plugin_->SetFocused(focused, focus_type);
161 HTMLFrameOwnerElement::SetFocused(focused, focus_type);
162 }
163
158 bool HTMLPlugInElement::RequestObjectInternal( 164 bool HTMLPlugInElement::RequestObjectInternal(
159 const String& url, 165 const String& url,
160 const String& mime_type, 166 const String& mime_type,
161 const Vector<String>& param_names, 167 const Vector<String>& param_names,
162 const Vector<String>& param_values) { 168 const Vector<String>& param_values) {
163 if (url.IsEmpty() && mime_type.IsEmpty()) 169 if (url.IsEmpty() && mime_type.IsEmpty())
164 return false; 170 return false;
165 171
166 if (ProtocolIsJavaScript(url)) 172 if (ProtocolIsJavaScript(url))
167 return false; 173 return false;
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 705
700 void HTMLPlugInElement::LazyReattachIfNeeded() { 706 void HTMLPlugInElement::LazyReattachIfNeeded() {
701 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() && 707 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() &&
702 !IsImageType()) { 708 !IsImageType()) {
703 LazyReattachIfAttached(); 709 LazyReattachIfAttached();
704 SetPersistedPlugin(nullptr); 710 SetPersistedPlugin(nullptr);
705 } 711 }
706 } 712 }
707 713
708 } // namespace blink 714 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPlugInElement.h ('k') | third_party/WebKit/Source/core/html/TextControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698