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 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 Loading... |
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 |
OLD | NEW |