| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/tabs/tab_finder.h" | 5 #include "chrome/browser/tabs/tab_finder.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.h" |
| 9 #include "chrome/browser/history/history.h" | 9 #include "chrome/browser/history/history.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/browser_list.h" | 12 #include "chrome/browser/ui/browser_list.h" |
| 13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
| 14 #include "chrome/common/render_messages_params.h" | |
| 15 #include "content/browser/tab_contents/navigation_entry.h" | 14 #include "content/browser/tab_contents/navigation_entry.h" |
| 16 #include "content/browser/tab_contents/tab_contents.h" | 15 #include "content/browser/tab_contents/tab_contents.h" |
| 17 #include "content/browser/tab_contents/tab_contents_observer.h" | 16 #include "content/browser/tab_contents/tab_contents_observer.h" |
| 18 #include "content/common/notification_service.h" | 17 #include "content/common/notification_service.h" |
| 19 #include "content/common/notification_source.h" | 18 #include "content/common/notification_source.h" |
| 20 #include "content/common/notification_type.h" | 19 #include "content/common/notification_type.h" |
| 21 #include "content/common/page_transition_types.h" | 20 #include "content/common/page_transition_types.h" |
| 21 #include "content/common/view_messages.h" |
| 22 | 22 |
| 23 class TabFinder::TabContentsObserverImpl : public TabContentsObserver { | 23 class TabFinder::TabContentsObserverImpl : public TabContentsObserver { |
| 24 public: | 24 public: |
| 25 TabContentsObserverImpl(TabContents* tab, TabFinder* finder); | 25 TabContentsObserverImpl(TabContents* tab, TabFinder* finder); |
| 26 virtual ~TabContentsObserverImpl(); | 26 virtual ~TabContentsObserverImpl(); |
| 27 | 27 |
| 28 TabContents* tab_contents() { return TabContentsObserver::tab_contents(); } | 28 TabContents* tab_contents() { return TabContentsObserver::tab_contents(); } |
| 29 | 29 |
| 30 // TabContentsObserver overrides: | 30 // TabContentsObserver overrides: |
| 31 virtual void DidNavigateAnyFramePostCommit( | 31 virtual void DidNavigateAnyFramePostCommit( |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 GURL url, | 233 GURL url, |
| 234 bool success, | 234 bool success, |
| 235 history::RedirectList* redirects) { | 235 history::RedirectList* redirects) { |
| 236 if (success && !redirects->empty()) { | 236 if (success && !redirects->empty()) { |
| 237 TabContents* tab_contents = | 237 TabContents* tab_contents = |
| 238 callback_consumer_.GetClientDataForCurrentRequest(); | 238 callback_consumer_.GetClientDataForCurrentRequest(); |
| 239 DCHECK(tab_contents); | 239 DCHECK(tab_contents); |
| 240 tab_contents_to_url_[tab_contents] = redirects->back(); | 240 tab_contents_to_url_[tab_contents] = redirects->back(); |
| 241 } | 241 } |
| 242 } | 242 } |
| OLD | NEW |