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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 7 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "chrome/common/url_constants.h" | 44 #include "chrome/common/url_constants.h" |
45 #include "content/browser/renderer_host/render_view_host.h" | 45 #include "content/browser/renderer_host/render_view_host.h" |
46 #include "content/browser/tab_contents/tab_contents.h" | 46 #include "content/browser/tab_contents/tab_contents.h" |
47 #include "content/browser/user_metrics.h" | 47 #include "content/browser/user_metrics.h" |
48 #include "content/public/browser/browser_thread.h" | 48 #include "content/public/browser/browser_thread.h" |
49 #include "content/public/browser/notification_service.h" | 49 #include "content/public/browser/notification_service.h" |
50 #include "grit/generated_resources.h" | 50 #include "grit/generated_resources.h" |
51 #include "grit/theme_resources.h" | 51 #include "grit/theme_resources.h" |
52 #include "ui/base/l10n/l10n_util.h" | 52 #include "ui/base/l10n/l10n_util.h" |
53 | 53 |
| 54 using content::BrowserThread; |
| 55 |
54 namespace { | 56 namespace { |
55 | 57 |
56 // The amount of time there must be no painting for us to consider painting | 58 // The amount of time there must be no painting for us to consider painting |
57 // finished. Observed times are in the ~1200ms range on Windows. | 59 // finished. Observed times are in the ~1200ms range on Windows. |
58 const int kTimeoutMs = 2000; | 60 const int kTimeoutMs = 2000; |
59 | 61 |
60 // Strings sent to the page via jstemplates used to set the direction of the | 62 // Strings sent to the page via jstemplates used to set the direction of the |
61 // HTML document based on locale. | 63 // HTML document based on locale. |
62 const char kRTLHtmlTextDirection[] = "rtl"; | 64 const char kRTLHtmlTextDirection[] = "rtl"; |
63 const char kLTRHtmlTextDirection[] = "ltr"; | 65 const char kLTRHtmlTextDirection[] = "ltr"; |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 SendResponse(request_id, html_bytes); | 339 SendResponse(request_id, html_bytes); |
338 } | 340 } |
339 | 341 |
340 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const { | 342 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const { |
341 return "text/html"; | 343 return "text/html"; |
342 } | 344 } |
343 | 345 |
344 bool NewTabUI::NewTabHTMLSource::ShouldReplaceExistingSource() const { | 346 bool NewTabUI::NewTabHTMLSource::ShouldReplaceExistingSource() const { |
345 return false; | 347 return false; |
346 } | 348 } |
OLD | NEW |