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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 1394383002: OOPIF: Send page-level focus messages to all processes rendering a page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
« no previous file with comments | « content/renderer/render_view_impl.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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3049 matching lines...) Expand 10 before | Expand all | Expand 10 after
3060 if (webview()->mainFrame()->isWebLocalFrame()) 3060 if (webview()->mainFrame()->isWebLocalFrame())
3061 return GURL(webview()->mainFrame()->document().url()); 3061 return GURL(webview()->mainFrame()->document().url());
3062 else 3062 else
3063 return GURL("chrome://gpu/RenderViewImpl::CreateGraphicsContext3D"); 3063 return GURL("chrome://gpu/RenderViewImpl::CreateGraphicsContext3D");
3064 } 3064 }
3065 3065
3066 void RenderViewImpl::OnSetFocus(bool enable) { 3066 void RenderViewImpl::OnSetFocus(bool enable) {
3067 // This message must always be received when the main frame is a 3067 // This message must always be received when the main frame is a
3068 // WebLocalFrame. 3068 // WebLocalFrame.
3069 CHECK(webview()->mainFrame()->isWebLocalFrame()); 3069 CHECK(webview()->mainFrame()->isWebLocalFrame());
3070 SetFocus(enable);
3071 }
3070 3072
3073 void RenderViewImpl::SetFocus(bool enable) {
3071 has_focus_ = enable; 3074 has_focus_ = enable;
3072 RenderWidget::OnSetFocus(enable); 3075 RenderWidget::OnSetFocus(enable);
3073 3076
3074 #if defined(ENABLE_PLUGINS) 3077 #if defined(ENABLE_PLUGINS)
3075 if (webview() && webview()->isActive()) { 3078 if (webview() && webview()->isActive()) {
3076 // Notify all NPAPI plugins. 3079 // Notify all NPAPI plugins.
3077 std::set<WebPluginDelegateProxy*>::iterator plugin_it; 3080 std::set<WebPluginDelegateProxy*>::iterator plugin_it;
3078 for (plugin_it = plugin_delegates_.begin(); 3081 for (plugin_it = plugin_delegates_.begin();
3079 plugin_it != plugin_delegates_.end(); ++plugin_it) { 3082 plugin_it != plugin_delegates_.end(); ++plugin_it) {
3080 #if defined(OS_MACOSX) 3083 #if defined(OS_MACOSX)
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
3685 std::vector<gfx::Size> sizes; 3688 std::vector<gfx::Size> sizes;
3686 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 3689 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
3687 if (!url.isEmpty()) 3690 if (!url.isEmpty())
3688 urls.push_back( 3691 urls.push_back(
3689 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 3692 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
3690 } 3693 }
3691 SendUpdateFaviconURL(urls); 3694 SendUpdateFaviconURL(urls);
3692 } 3695 }
3693 3696
3694 } // namespace content 3697 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698