Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 3060 | 3060 |
| 3061 GURL RenderViewImpl::GetURLForGraphicsContext3D() { | 3061 GURL RenderViewImpl::GetURLForGraphicsContext3D() { |
| 3062 DCHECK(webview()); | 3062 DCHECK(webview()); |
| 3063 if (webview()->mainFrame()->isWebLocalFrame()) | 3063 if (webview()->mainFrame()->isWebLocalFrame()) |
| 3064 return GURL(webview()->mainFrame()->document().url()); | 3064 return GURL(webview()->mainFrame()->document().url()); |
| 3065 else | 3065 else |
| 3066 return GURL("chrome://gpu/RenderViewImpl::CreateGraphicsContext3D"); | 3066 return GURL("chrome://gpu/RenderViewImpl::CreateGraphicsContext3D"); |
| 3067 } | 3067 } |
| 3068 | 3068 |
| 3069 void RenderViewImpl::OnSetFocus(bool enable) { | 3069 void RenderViewImpl::OnSetFocus(bool enable) { |
| 3070 SetFocus(enable); | |
| 3071 } | |
| 3072 | |
| 3073 void RenderViewImpl::SetFocus(bool enable) { | |
|
alexmos
2015/10/16 16:50:45
I exposed this so that I could call it from Render
Charlie Reis
2015/10/16 18:56:09
Acknowledged.
| |
| 3070 has_focus_ = enable; | 3074 has_focus_ = enable; |
| 3071 RenderWidget::OnSetFocus(enable); | 3075 RenderWidget::OnSetFocus(enable); |
| 3072 | 3076 |
| 3073 #if defined(ENABLE_PLUGINS) | 3077 #if defined(ENABLE_PLUGINS) |
| 3074 if (webview() && webview()->isActive()) { | 3078 if (webview() && webview()->isActive()) { |
| 3075 // Notify all NPAPI plugins. | 3079 // Notify all NPAPI plugins. |
| 3076 std::set<WebPluginDelegateProxy*>::iterator plugin_it; | 3080 std::set<WebPluginDelegateProxy*>::iterator plugin_it; |
| 3077 for (plugin_it = plugin_delegates_.begin(); | 3081 for (plugin_it = plugin_delegates_.begin(); |
| 3078 plugin_it != plugin_delegates_.end(); ++plugin_it) { | 3082 plugin_it != plugin_delegates_.end(); ++plugin_it) { |
| 3079 #if defined(OS_MACOSX) | 3083 #if defined(OS_MACOSX) |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3684 std::vector<gfx::Size> sizes; | 3688 std::vector<gfx::Size> sizes; |
| 3685 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 3689 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 3686 if (!url.isEmpty()) | 3690 if (!url.isEmpty()) |
| 3687 urls.push_back( | 3691 urls.push_back( |
| 3688 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 3692 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 3689 } | 3693 } |
| 3690 SendUpdateFaviconURL(urls); | 3694 SendUpdateFaviconURL(urls); |
| 3691 } | 3695 } |
| 3692 | 3696 |
| 3693 } // namespace content | 3697 } // namespace content |
| OLD | NEW |