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 <stddef.h> | 7 #include <stddef.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 if (!window_) { | 355 if (!window_) { |
356 pending_navigate_ = std::move(request); | 356 pending_navigate_ = std::move(request); |
357 return; | 357 return; |
358 } | 358 } |
359 | 359 |
360 // Drop any pending navigation requests. | 360 // Drop any pending navigation requests. |
361 navigate_weak_ptr_factory_.InvalidateWeakPtrs(); | 361 navigate_weak_ptr_factory_.InvalidateWeakPtrs(); |
362 | 362 |
363 DVLOG(2) << "Frame::StartNavigate id=" << id_ << " url=" << request->url; | 363 DVLOG(2) << "Frame::StartNavigate id=" << id_ << " url=" << request->url; |
364 | 364 |
365 const GURL requested_url(request->url); | 365 const GURL requested_url(request->url.get()); |
366 base::TimeTicks navigation_start_time = | 366 base::TimeTicks navigation_start_time = |
367 base::TimeTicks::FromInternalValue(request->originating_time_ticks); | 367 base::TimeTicks::FromInternalValue(request->originating_time_ticks); |
368 tree_->delegate_->CanNavigateFrame( | 368 tree_->delegate_->CanNavigateFrame( |
369 this, std::move(request), | 369 this, std::move(request), |
370 base::Bind(&Frame::OnCanNavigateFrame, | 370 base::Bind(&Frame::OnCanNavigateFrame, |
371 navigate_weak_ptr_factory_.GetWeakPtr(), requested_url, | 371 navigate_weak_ptr_factory_.GetWeakPtr(), requested_url, |
372 navigation_start_time)); | 372 navigation_start_time)); |
373 } | 373 } |
374 | 374 |
375 void Frame::OnCanNavigateFrame( | 375 void Frame::OnCanNavigateFrame( |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 final_update); | 600 final_update); |
601 } | 601 } |
602 | 602 |
603 void Frame::OnFindInPageSelectionUpdated(int32_t request_id, | 603 void Frame::OnFindInPageSelectionUpdated(int32_t request_id, |
604 int32_t active_match_ordinal) { | 604 int32_t active_match_ordinal) { |
605 tree_->delegate_->OnFindInPageSelectionUpdated(request_id, this, | 605 tree_->delegate_->OnFindInPageSelectionUpdated(request_id, this, |
606 active_match_ordinal); | 606 active_match_ordinal); |
607 } | 607 } |
608 | 608 |
609 } // namespace web_view | 609 } // namespace web_view |
OLD | NEW |