OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/web_view/frame.h" | 5 #include "components/web_view/frame.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 uint32_t last_dispatch_load_event_frame_id() const { | 123 uint32_t last_dispatch_load_event_frame_id() const { |
124 return last_dispatch_load_event_frame_id_; | 124 return last_dispatch_load_event_frame_id_; |
125 } | 125 } |
126 | 126 |
127 // mojom::FrameClient: | 127 // mojom::FrameClient: |
128 void OnConnect(mojom::FramePtr frame, | 128 void OnConnect(mojom::FramePtr frame, |
129 uint32_t change_id, | 129 uint32_t change_id, |
130 uint32_t view_id, | 130 uint32_t view_id, |
131 mojom::ViewConnectType view_connect_type, | 131 mojom::ViewConnectType view_connect_type, |
132 mojo::Array<mojom::FrameDataPtr> frames, | 132 mojo::Array<mojom::FrameDataPtr> frames, |
| 133 int64_t navigation_start_time_ticks, |
133 const OnConnectCallback& callback) override { | 134 const OnConnectCallback& callback) override { |
134 connect_count_++; | 135 connect_count_++; |
135 connect_frames_ = frames.Pass(); | 136 connect_frames_ = frames.Pass(); |
136 if (frame) | 137 if (frame) |
137 server_frame_ = frame.Pass(); | 138 server_frame_ = frame.Pass(); |
138 callback.Run(); | 139 callback.Run(); |
139 if (!on_connect_callback_.is_null()) | 140 if (!on_connect_callback_.is_null()) |
140 on_connect_callback_.Run(); | 141 on_connect_callback_.Run(); |
141 } | 142 } |
142 void OnFrameAdded(uint32_t change_id, mojom::FrameDataPtr frame) override { | 143 void OnFrameAdded(uint32_t change_id, mojom::FrameDataPtr frame) override { |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 child_view_and_frame->server_frame()->DispatchLoadEventToParent(); | 523 child_view_and_frame->server_frame()->DispatchLoadEventToParent(); |
523 | 524 |
524 run_loop.Run(); | 525 run_loop.Run(); |
525 | 526 |
526 uint32_t frame_id = root_view_and_frame() | 527 uint32_t frame_id = root_view_and_frame() |
527 ->test_frame_client() | 528 ->test_frame_client() |
528 ->last_dispatch_load_event_frame_id(); | 529 ->last_dispatch_load_event_frame_id(); |
529 EXPECT_EQ(child_frame_id, frame_id); | 530 EXPECT_EQ(child_frame_id, frame_id); |
530 } | 531 } |
531 } // namespace web_view | 532 } // namespace web_view |
OLD | NEW |