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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 content_detectors_.push_back(linked_ptr<ContentDetector>( | 909 content_detectors_.push_back(linked_ptr<ContentDetector>( |
910 new PhoneNumberDetector(region_code))); | 910 new PhoneNumberDetector(region_code))); |
911 content_detectors_.push_back(linked_ptr<ContentDetector>( | 911 content_detectors_.push_back(linked_ptr<ContentDetector>( |
912 new EmailDetector())); | 912 new EmailDetector())); |
913 #endif | 913 #endif |
914 | 914 |
915 RenderThread::Get()->AddRoute(routing_id_, this); | 915 RenderThread::Get()->AddRoute(routing_id_, this); |
916 // Take a reference on behalf of the RenderThread. This will be balanced | 916 // Take a reference on behalf of the RenderThread. This will be balanced |
917 // when we receive ViewMsg_ClosePage. | 917 // when we receive ViewMsg_ClosePage. |
918 AddRef(); | 918 AddRef(); |
919 if (is_hidden_) | 919 if (RenderThreadImpl::current()) { |
920 RenderThread::Get()->WidgetHidden(); | 920 RenderThreadImpl::current()->WidgetCreated(); |
| 921 if (is_hidden_) |
| 922 RenderThreadImpl::current()->WidgetHidden(); |
| 923 } |
921 | 924 |
922 // If this is a popup, we must wait for the CreatingNew_ACK message before | 925 // If this is a popup, we must wait for the CreatingNew_ACK message before |
923 // completing initialization. Otherwise, we can finish it now. | 926 // completing initialization. Otherwise, we can finish it now. |
924 if (opener_id_ == MSG_ROUTING_NONE) { | 927 if (opener_id_ == MSG_ROUTING_NONE) { |
925 did_show_ = true; | 928 did_show_ = true; |
926 CompleteInit(); | 929 CompleteInit(); |
927 } | 930 } |
928 | 931 |
929 g_view_map.Get().insert(std::make_pair(webview(), this)); | 932 g_view_map.Get().insert(std::make_pair(webview(), this)); |
930 g_routing_id_view_map.Get().insert(std::make_pair(routing_id_, this)); | 933 g_routing_id_view_map.Get().insert(std::make_pair(routing_id_, this)); |
(...skipping 5452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6383 for (size_t i = 0; i < icon_urls.size(); i++) { | 6386 for (size_t i = 0; i < icon_urls.size(); i++) { |
6384 WebURL url = icon_urls[i].iconURL(); | 6387 WebURL url = icon_urls[i].iconURL(); |
6385 if (!url.isEmpty()) | 6388 if (!url.isEmpty()) |
6386 urls.push_back(FaviconURL(url, | 6389 urls.push_back(FaviconURL(url, |
6387 ToFaviconType(icon_urls[i].iconType()))); | 6390 ToFaviconType(icon_urls[i].iconType()))); |
6388 } | 6391 } |
6389 SendUpdateFaviconURL(urls); | 6392 SendUpdateFaviconURL(urls); |
6390 } | 6393 } |
6391 | 6394 |
6392 } // namespace content | 6395 } // namespace content |
OLD | NEW |