| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "webkit/tools/test_shell/test_navigation_controller.h" | 5 #include "webkit/tools/test_shell/test_navigation_controller.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "webkit/tools/test_shell/test_shell.h" | 8 #include "webkit/tools/test_shell/test_shell.h" |
| 9 | 9 |
| 10 // ---------------------------------------------------------------------------- | 10 // ---------------------------------------------------------------------------- |
| 11 // TestNavigationEntry | 11 // TestNavigationEntry |
| 12 | 12 |
| 13 TestNavigationEntry::TestNavigationEntry() | 13 TestNavigationEntry::TestNavigationEntry() |
| 14 : page_id_(-1) { | 14 : page_id_(-1) { |
| 15 } | 15 } |
| 16 | 16 |
| 17 TestNavigationEntry::TestNavigationEntry(int page_id, | 17 TestNavigationEntry::TestNavigationEntry(int page_id, |
| 18 const GURL& url, | 18 const GURL& url, |
| 19 const std::wstring& title, | 19 const string16& target_frame) |
| 20 const std::wstring& target_frame) | |
| 21 : page_id_(page_id), | 20 : page_id_(page_id), |
| 22 url_(url), | 21 url_(url), |
| 23 title_(title), | |
| 24 target_frame_(target_frame) { | 22 target_frame_(target_frame) { |
| 25 } | 23 } |
| 26 | 24 |
| 27 TestNavigationEntry::~TestNavigationEntry() { | 25 TestNavigationEntry::~TestNavigationEntry() { |
| 28 } | 26 } |
| 29 | 27 |
| 30 void TestNavigationEntry::SetContentState(const std::string& state) { | 28 void TestNavigationEntry::SetContentState(const std::string& state) { |
| 31 state_ = state; | 29 state_ = state; |
| 32 } | 30 } |
| 33 | 31 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 } else { | 221 } else { |
| 224 DiscardPendingEntry(); | 222 DiscardPendingEntry(); |
| 225 } | 223 } |
| 226 } | 224 } |
| 227 | 225 |
| 228 void TestNavigationController::UpdateMaxPageID() { | 226 void TestNavigationController::UpdateMaxPageID() { |
| 229 TestNavigationEntry* entry = GetActiveEntry(); | 227 TestNavigationEntry* entry = GetActiveEntry(); |
| 230 if (entry) | 228 if (entry) |
| 231 max_page_id_ = std::max(max_page_id_, entry->GetPageID()); | 229 max_page_id_ = std::max(max_page_id_, entry->GetPageID()); |
| 232 } | 230 } |
| OLD | NEW |