| 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 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 3794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3805 | 3805 |
| 3806 Send(new ViewHostMsg_FrameTreeUpdated(routing_id_, json)); | 3806 Send(new ViewHostMsg_FrameTreeUpdated(routing_id_, json)); |
| 3807 } | 3807 } |
| 3808 | 3808 |
| 3809 void RenderViewImpl::CreateFrameTree(WebKit::WebFrame* frame, | 3809 void RenderViewImpl::CreateFrameTree(WebKit::WebFrame* frame, |
| 3810 DictionaryValue* frame_tree) { | 3810 DictionaryValue* frame_tree) { |
| 3811 NavigateToSwappedOutURL(frame); | 3811 NavigateToSwappedOutURL(frame); |
| 3812 | 3812 |
| 3813 string16 name; | 3813 string16 name; |
| 3814 if (frame_tree->GetString(content::kFrameTreeNodeNameKey, &name) && | 3814 if (frame_tree->GetString(content::kFrameTreeNodeNameKey, &name) && |
| 3815 name != string16()) { | 3815 !name.empty()) { |
| 3816 frame->setName(name); | 3816 frame->setName(name); |
| 3817 } | 3817 } |
| 3818 | 3818 |
| 3819 int remote_id; | 3819 int remote_id; |
| 3820 if (frame_tree->GetInteger(content::kFrameTreeNodeIdKey, &remote_id)) | 3820 if (frame_tree->GetInteger(content::kFrameTreeNodeIdKey, &remote_id)) |
| 3821 active_frame_id_map_.insert(std::pair<int, int>(frame->identifier(), | 3821 active_frame_id_map_.insert(std::pair<int, int>(frame->identifier(), |
| 3822 remote_id)); | 3822 remote_id)); |
| 3823 | 3823 |
| 3824 ListValue* children; | 3824 ListValue* children; |
| 3825 if (!frame_tree->GetList(content::kFrameTreeNodeSubtreeKey, &children)) | 3825 if (!frame_tree->GetList(content::kFrameTreeNodeSubtreeKey, &children)) |
| (...skipping 2352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6178 | 6178 |
| 6179 updating_frame_tree_ = true; | 6179 updating_frame_tree_ = true; |
| 6180 active_frame_id_map_.clear(); | 6180 active_frame_id_map_.clear(); |
| 6181 | 6181 |
| 6182 target_process_id_ = process_id; | 6182 target_process_id_ = process_id; |
| 6183 target_routing_id_ = route_id; | 6183 target_routing_id_ = route_id; |
| 6184 CreateFrameTree(webview()->mainFrame(), frames); | 6184 CreateFrameTree(webview()->mainFrame(), frames); |
| 6185 | 6185 |
| 6186 updating_frame_tree_ = false; | 6186 updating_frame_tree_ = false; |
| 6187 } | 6187 } |
| OLD | NEW |