| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/webui/ntp/android/new_tab_page_ready_handler.h" | 5 #include "chrome/browser/ui/webui/ntp/android/new_tab_page_ready_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/common/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| 11 #include "content/public/browser/notification_service.h" | 11 #include "content/public/browser/notification_service.h" |
| 12 #include "content/public/browser/web_contents.h" | 12 #include "content/public/browser/web_contents.h" |
| 13 #include "content/public/browser/web_ui.h" | 13 #include "content/public/browser/web_ui.h" |
| 14 | 14 |
| 15 NewTabPageReadyHandler::NewTabPageReadyHandler() { | 15 NewTabPageReadyHandler::NewTabPageReadyHandler() { |
| 16 } | 16 } |
| 17 | 17 |
| 18 NewTabPageReadyHandler::~NewTabPageReadyHandler() { | 18 NewTabPageReadyHandler::~NewTabPageReadyHandler() { |
| 19 } | 19 } |
| 20 | 20 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 44 | 44 |
| 45 void NewTabPageReadyHandler::HandleNewTabPageUnexpectedNavigation( | 45 void NewTabPageReadyHandler::HandleNewTabPageUnexpectedNavigation( |
| 46 const ListValue* args) { | 46 const ListValue* args) { |
| 47 // NTP reached an unexpected state trying to send finish loading notification | 47 // NTP reached an unexpected state trying to send finish loading notification |
| 48 // a second time. The notification should be sent only when page is | 48 // a second time. The notification should be sent only when page is |
| 49 // completely done loading. This could otherwise create a race condition in | 49 // completely done loading. This could otherwise create a race condition in |
| 50 // tests waiting for the NTP to have loaded (any navigation NTP does after | 50 // tests waiting for the NTP to have loaded (any navigation NTP does after |
| 51 // loading could interfere with the test navigation). | 51 // loading could interfere with the test navigation). |
| 52 NOTREACHED(); | 52 NOTREACHED(); |
| 53 } | 53 } |
| OLD | NEW |