OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 // Notify PDM that this is a first run. | 440 // Notify PDM that this is a first run. |
441 ImportAutofillDataWin( | 441 ImportAutofillDataWin( |
442 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); | 442 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); |
443 #endif // defined(OS_WIN) | 443 #endif // defined(OS_WIN) |
444 } | 444 } |
445 | 445 |
446 fullscreen_controller_.reset(new FullscreenController(this)); | 446 fullscreen_controller_.reset(new FullscreenController(this)); |
447 } | 447 } |
448 | 448 |
449 Browser::~Browser() { | 449 Browser::~Browser() { |
| 450 registrar_.RemoveAll(); |
| 451 |
450 // The tab strip should not have any tabs at this point. | 452 // The tab strip should not have any tabs at this point. |
451 DCHECK(tab_strip_model_->empty()); | 453 DCHECK(tab_strip_model_->empty()); |
452 tab_strip_model_->RemoveObserver(this); | 454 tab_strip_model_->RemoveObserver(this); |
453 | 455 |
454 // Destroy the BrowserCommandController before removing the browser, so that | 456 // Destroy the BrowserCommandController before removing the browser, so that |
455 // it doesn't act on any notifications that are sent as a result of removing | 457 // it doesn't act on any notifications that are sent as a result of removing |
456 // the browser. | 458 // the browser. |
457 command_controller_.reset(); | 459 command_controller_.reset(); |
458 BrowserList::RemoveBrowser(this); | 460 BrowserList::RemoveBrowser(this); |
459 | 461 |
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2417 if (contents && !allow_js_access) { | 2419 if (contents && !allow_js_access) { |
2418 contents->web_contents()->GetController().LoadURL( | 2420 contents->web_contents()->GetController().LoadURL( |
2419 target_url, | 2421 target_url, |
2420 content::Referrer(), | 2422 content::Referrer(), |
2421 content::PAGE_TRANSITION_LINK, | 2423 content::PAGE_TRANSITION_LINK, |
2422 std::string()); // No extra headers. | 2424 std::string()); // No extra headers. |
2423 } | 2425 } |
2424 | 2426 |
2425 return contents != NULL; | 2427 return contents != NULL; |
2426 } | 2428 } |
OLD | NEW |