OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/frame_host/navigation_controller_impl.h" | 5 #include "content/browser/frame_host/navigation_controller_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 bool did_replace_entry() { return did_replace_entry_; } | 320 bool did_replace_entry() { return did_replace_entry_; } |
321 | 321 |
322 private: | 322 private: |
323 void DidFinishNavigation(NavigationHandle* navigation_handle) override { | 323 void DidFinishNavigation(NavigationHandle* navigation_handle) override { |
324 if (!navigation_handle->HasCommitted()) | 324 if (!navigation_handle->HasCommitted()) |
325 return; | 325 return; |
326 | 326 |
327 navigation_type_ = static_cast<NavigationHandleImpl*>(navigation_handle) | 327 navigation_type_ = static_cast<NavigationHandleImpl*>(navigation_handle) |
328 ->navigation_type(); | 328 ->navigation_type(); |
329 previous_url_ = navigation_handle->GetPreviousURL(); | 329 previous_url_ = navigation_handle->GetPreviousURL(); |
330 is_in_page_ = navigation_handle->IsSamePage(); | 330 is_in_page_ = navigation_handle->IsSameDocument(); |
331 is_main_frame_ = navigation_handle->IsInMainFrame(); | 331 is_main_frame_ = navigation_handle->IsInMainFrame(); |
332 did_replace_entry_ = navigation_handle->DidReplaceEntry(); | 332 did_replace_entry_ = navigation_handle->DidReplaceEntry(); |
333 } | 333 } |
334 | 334 |
335 NavigationType navigation_type_; | 335 NavigationType navigation_type_; |
336 GURL previous_url_; | 336 GURL previous_url_; |
337 bool is_in_page_; | 337 bool is_in_page_; |
338 bool is_main_frame_; | 338 bool is_main_frame_; |
339 bool did_replace_entry_; | 339 bool did_replace_entry_; |
340 }; | 340 }; |
(...skipping 4943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5284 main_test_rfh()->SimulateNavigationStart(url_1); | 5284 main_test_rfh()->SimulateNavigationStart(url_1); |
5285 EXPECT_EQ(url_1, controller.GetVisibleEntry()->GetURL()); | 5285 EXPECT_EQ(url_1, controller.GetVisibleEntry()->GetURL()); |
5286 EXPECT_EQ(ReloadType::NONE, last_reload_type_); | 5286 EXPECT_EQ(ReloadType::NONE, last_reload_type_); |
5287 | 5287 |
5288 main_test_rfh()->SimulateNavigationCommit(url_2); | 5288 main_test_rfh()->SimulateNavigationCommit(url_2); |
5289 main_test_rfh()->SimulateNavigationCommit(url_1); | 5289 main_test_rfh()->SimulateNavigationCommit(url_1); |
5290 main_test_rfh()->SimulateNavigationCommit(url_1); | 5290 main_test_rfh()->SimulateNavigationCommit(url_1); |
5291 } | 5291 } |
5292 | 5292 |
5293 } // namespace content | 5293 } // namespace content |
OLD | NEW |