| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 return root_window_and_frame_.get(); | 309 return root_window_and_frame_.get(); |
| 310 } | 310 } |
| 311 | 311 |
| 312 scoped_ptr<WindowAndFrame> NavigateFrameWithStartTime( | 312 scoped_ptr<WindowAndFrame> NavigateFrameWithStartTime( |
| 313 WindowAndFrame* window_and_frame, | 313 WindowAndFrame* window_and_frame, |
| 314 base::TimeTicks navigation_start_time) { | 314 base::TimeTicks navigation_start_time) { |
| 315 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 315 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
| 316 request->url = mojo::String::From(application_impl()->url()); | 316 request->url = mojo::String::From(application_impl()->url()); |
| 317 request->originating_time_ticks = navigation_start_time.ToInternalValue(); | 317 request->originating_time_ticks = navigation_start_time.ToInternalValue(); |
| 318 window_and_frame->server_frame()->RequestNavigate( | 318 window_and_frame->server_frame()->RequestNavigate( |
| 319 mojom::NAVIGATION_TARGET_TYPE_EXISTING_FRAME, | 319 mojom::NavigationTargetType::EXISTING_FRAME, |
| 320 window_and_frame->window()->id(), std::move(request)); | 320 window_and_frame->window()->id(), std::move(request)); |
| 321 return WaitForViewAndFrame(); | 321 return WaitForViewAndFrame(); |
| 322 } | 322 } |
| 323 | 323 |
| 324 scoped_ptr<WindowAndFrame> NavigateFrame(WindowAndFrame* window_and_frame) { | 324 scoped_ptr<WindowAndFrame> NavigateFrame(WindowAndFrame* window_and_frame) { |
| 325 return NavigateFrameWithStartTime(window_and_frame, base::TimeTicks()); | 325 return NavigateFrameWithStartTime(window_and_frame, base::TimeTicks()); |
| 326 } | 326 } |
| 327 | 327 |
| 328 // Creates a new shared frame as a child of |parent|. | 328 // Creates a new shared frame as a child of |parent|. |
| 329 scoped_ptr<WindowAndFrame> CreateChildWindowAndFrame(WindowAndFrame* parent) { | 329 scoped_ptr<WindowAndFrame> CreateChildWindowAndFrame(WindowAndFrame* parent) { |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 base::TimeTicks navigation_start_time = base::TimeTicks::FromInternalValue(1); | 578 base::TimeTicks navigation_start_time = base::TimeTicks::FromInternalValue(1); |
| 579 scoped_ptr<WindowAndFrame> navigated_child_view_and_frame = | 579 scoped_ptr<WindowAndFrame> navigated_child_view_and_frame = |
| 580 NavigateFrameWithStartTime(child_view_and_frame.get(), | 580 NavigateFrameWithStartTime(child_view_and_frame.get(), |
| 581 navigation_start_time); | 581 navigation_start_time); |
| 582 EXPECT_EQ(navigation_start_time, | 582 EXPECT_EQ(navigation_start_time, |
| 583 navigated_child_view_and_frame->test_frame_client() | 583 navigated_child_view_and_frame->test_frame_client() |
| 584 ->last_navigation_start_time()); | 584 ->last_navigation_start_time()); |
| 585 } | 585 } |
| 586 | 586 |
| 587 } // namespace web_view | 587 } // namespace web_view |
| OLD | NEW |