| 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/search/instant_controller.h" | 5 #include "chrome/browser/ui/search/instant_controller.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "chrome/browser/content_settings/content_settings_provider.h" | 10 #include "chrome/browser/content_settings/content_settings_provider.h" |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 content::NotificationService::current()->Notify( | 438 content::NotificationService::current()->Notify( |
| 439 chrome::NOTIFICATION_INSTANT_NTP_SUPPORT_DETERMINED, | 439 chrome::NOTIFICATION_INSTANT_NTP_SUPPORT_DETERMINED, |
| 440 content::Source<InstantController>(this), | 440 content::Source<InstantController>(this), |
| 441 content::NotificationService::NoDetails()); | 441 content::NotificationService::NoDetails()); |
| 442 | 442 |
| 443 } else { | 443 } else { |
| 444 NOTREACHED(); | 444 NOTREACHED(); |
| 445 } | 445 } |
| 446 } | 446 } |
| 447 | 447 |
| 448 void InstantController::InstantPageRenderViewGone( | 448 void InstantController::InstantPageRenderProcessGone( |
| 449 const content::WebContents* contents) { | 449 const content::WebContents* contents) { |
| 450 if (IsContentsFrom(ntp(), contents)) { | 450 if (IsContentsFrom(ntp(), contents)) { |
| 451 DeletePageSoon(ntp_.Pass()); | 451 DeletePageSoon(ntp_.Pass()); |
| 452 } else { | 452 } else { |
| 453 NOTREACHED(); | 453 NOTREACHED(); |
| 454 } | 454 } |
| 455 } | 455 } |
| 456 | 456 |
| 457 void InstantController::InstantPageAboutToNavigateMainFrame( | 457 void InstantController::InstantPageAboutToNavigateMainFrame( |
| 458 const content::WebContents* contents, | 458 const content::WebContents* contents, |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 | 669 |
| 670 bool InstantController::InStartup() const { | 670 bool InstantController::InStartup() const { |
| 671 // TODO(shishir): This is not completely reliable. Find a better way to detect | 671 // TODO(shishir): This is not completely reliable. Find a better way to detect |
| 672 // startup time. | 672 // startup time. |
| 673 return !browser_->GetActiveWebContents(); | 673 return !browser_->GetActiveWebContents(); |
| 674 } | 674 } |
| 675 | 675 |
| 676 InstantService* InstantController::GetInstantService() const { | 676 InstantService* InstantController::GetInstantService() const { |
| 677 return InstantServiceFactory::GetForProfile(profile()); | 677 return InstantServiceFactory::GetForProfile(profile()); |
| 678 } | 678 } |
| OLD | NEW |