OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "browsing_instance_frame_id.h" |
| 6 |
| 7 namespace content { |
| 8 |
| 9 BrowsingInstanceFrame::WebKitFrameIdTuple::WebKitFrameIdTuple(int proc_host_id, |
| 10 int64 frame_id) |
| 11 : process_host_id(proc_host_id), |
| 12 frame_id(frame_id) { |
| 13 } |
| 14 |
| 15 bool BrowsingInstanceFrame::WebKitFrameIdTuple::operator==( |
| 16 const WebKitFrameIdTuple& o) const { |
| 17 return o.process_host_id == process_host_id && |
| 18 o.frame_id == frame_id; |
| 19 } |
| 20 |
| 21 BrowsingInstanceFrame::BrowsingInstanceFrame(int64 id, bool is_top_level) |
| 22 : id_(id), |
| 23 current_webkit_frame_(WebKitFrameIdTuple(-1, -1)), |
| 24 current_route_id_(-1), |
| 25 is_top_level_(is_top_level) { |
| 26 } |
| 27 |
| 28 BrowsingInstanceFrame::~BrowsingInstanceFrame() { |
| 29 } |
| 30 |
| 31 void BrowsingInstanceFrame::UpdateFrame(int new_process_host_id, |
| 32 int new_route_id, |
| 33 int64 new_frame_id) { |
| 34 WebKitFrameIdTuple newWebKitTuple(new_process_host_id, new_frame_id); |
| 35 current_webkit_frame_ = newWebKitTuple; |
| 36 current_route_id_ = new_route_id; |
| 37 |
| 38 all_webkit_frames_.push_back(newWebKitTuple); |
| 39 // TODO(supersat): Clear out subframes? |
| 40 } |
| 41 |
| 42 } // namespace content |
OLD | NEW |