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 3057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3068 if (webview()->mainFrame()->isWebLocalFrame()) | 3068 if (webview()->mainFrame()->isWebLocalFrame()) |
3069 return GURL(webview()->mainFrame()->document().url()); | 3069 return GURL(webview()->mainFrame()->document().url()); |
3070 else | 3070 else |
3071 return GURL("chrome://gpu/RenderViewImpl::CreateGraphicsContext3D"); | 3071 return GURL("chrome://gpu/RenderViewImpl::CreateGraphicsContext3D"); |
3072 } | 3072 } |
3073 | 3073 |
3074 void RenderViewImpl::OnSetFocus(bool enable) { | 3074 void RenderViewImpl::OnSetFocus(bool enable) { |
3075 // This message must always be received when the main frame is a | 3075 // This message must always be received when the main frame is a |
3076 // WebLocalFrame. | 3076 // WebLocalFrame. |
3077 CHECK(webview()->mainFrame()->isWebLocalFrame()); | 3077 CHECK(webview()->mainFrame()->isWebLocalFrame()); |
| 3078 SetFocus(enable); |
| 3079 } |
3078 | 3080 |
| 3081 void RenderViewImpl::SetFocus(bool enable) { |
3079 has_focus_ = enable; | 3082 has_focus_ = enable; |
3080 RenderWidget::OnSetFocus(enable); | 3083 RenderWidget::OnSetFocus(enable); |
3081 | 3084 |
3082 #if defined(ENABLE_PLUGINS) | 3085 #if defined(ENABLE_PLUGINS) |
3083 if (webview() && webview()->isActive()) { | 3086 if (webview() && webview()->isActive()) { |
3084 // Notify all NPAPI plugins. | 3087 // Notify all NPAPI plugins. |
3085 std::set<WebPluginDelegateProxy*>::iterator plugin_it; | 3088 std::set<WebPluginDelegateProxy*>::iterator plugin_it; |
3086 for (plugin_it = plugin_delegates_.begin(); | 3089 for (plugin_it = plugin_delegates_.begin(); |
3087 plugin_it != plugin_delegates_.end(); ++plugin_it) { | 3090 plugin_it != plugin_delegates_.end(); ++plugin_it) { |
3088 #if defined(OS_MACOSX) | 3091 #if defined(OS_MACOSX) |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3693 std::vector<gfx::Size> sizes; | 3696 std::vector<gfx::Size> sizes; |
3694 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 3697 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
3695 if (!url.isEmpty()) | 3698 if (!url.isEmpty()) |
3696 urls.push_back( | 3699 urls.push_back( |
3697 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 3700 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
3698 } | 3701 } |
3699 SendUpdateFaviconURL(urls); | 3702 SendUpdateFaviconURL(urls); |
3700 } | 3703 } |
3701 | 3704 |
3702 } // namespace content | 3705 } // namespace content |
OLD | NEW |