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/chromeos/boot_times_loader.h" | 5 #include "chrome/browser/chromeos/boot_times_loader.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/process_util.h" | 16 #include "base/process_util.h" |
17 #include "base/string_number_conversions.h" | 17 #include "base/string_number_conversions.h" |
18 #include "base/string_util.h" | 18 #include "base/string_util.h" |
19 #include "base/stringprintf.h" | 19 #include "base/stringprintf.h" |
20 #include "base/threading/thread.h" | 20 #include "base/threading/thread.h" |
21 #include "base/threading/thread_restrictions.h" | 21 #include "base/threading/thread_restrictions.h" |
22 #include "base/time.h" | 22 #include "base/time.h" |
23 #include "chrome/browser/browser_process.h" | 23 #include "chrome/browser/browser_process.h" |
24 #include "chrome/browser/chromeos/login/authentication_notification_details.h" | 24 #include "chrome/browser/chromeos/login/authentication_notification_details.h" |
25 #include "chrome/browser/ui/browser.h" | 25 #include "chrome/browser/ui/browser.h" |
26 #include "chrome/browser/ui/browser_list.h" | 26 #include "chrome/browser/ui/browser_list.h" |
| 27 #include "chrome/browser/ui/browser_tabstrip.h" |
27 #include "chrome/common/chrome_notification_types.h" | 28 #include "chrome/common/chrome_notification_types.h" |
28 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
29 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
30 #include "content/public/browser/navigation_controller.h" | 31 #include "content/public/browser/navigation_controller.h" |
31 #include "content/public/browser/notification_service.h" | 32 #include "content/public/browser/notification_service.h" |
32 #include "content/public/browser/render_widget_host_view.h" | 33 #include "content/public/browser/render_widget_host_view.h" |
33 #include "content/public/browser/web_contents.h" | 34 #include "content/public/browser/web_contents.h" |
34 | 35 |
35 using content::BrowserThread; | 36 using content::BrowserThread; |
36 using content::NavigationController; | 37 using content::NavigationController; |
(...skipping 14 matching lines...) Expand all Loading... |
51 return NULL; | 52 return NULL; |
52 } | 53 } |
53 | 54 |
54 const std::string GetTabUrl(RenderWidgetHost* rwh) { | 55 const std::string GetTabUrl(RenderWidgetHost* rwh) { |
55 RenderWidgetHostView* rwhv = rwh->GetView(); | 56 RenderWidgetHostView* rwhv = rwh->GetView(); |
56 for (BrowserList::const_iterator it = BrowserList::begin(); | 57 for (BrowserList::const_iterator it = BrowserList::begin(); |
57 it != BrowserList::end(); | 58 it != BrowserList::end(); |
58 ++it) { | 59 ++it) { |
59 Browser* browser = *it; | 60 Browser* browser = *it; |
60 for (int i = 0, tab_count = browser->tab_count(); i < tab_count; ++i) { | 61 for (int i = 0, tab_count = browser->tab_count(); i < tab_count; ++i) { |
61 WebContents* tab = browser->GetWebContentsAt(i); | 62 WebContents* tab = chrome::GetWebContentsAt(browser, i); |
62 if (tab->GetRenderWidgetHostView() == rwhv) { | 63 if (tab->GetRenderWidgetHostView() == rwhv) { |
63 return tab->GetURL().spec(); | 64 return tab->GetURL().spec(); |
64 } | 65 } |
65 } | 66 } |
66 } | 67 } |
67 return std::string(); | 68 return std::string(); |
68 } | 69 } |
69 } | 70 } |
70 | 71 |
71 namespace chromeos { | 72 namespace chromeos { |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 GetRenderWidgetHost(&web_contents->GetController()); | 515 GetRenderWidgetHost(&web_contents->GetController()); |
515 render_widget_hosts_loading_.erase(render_widget_host); | 516 render_widget_hosts_loading_.erase(render_widget_host); |
516 break; | 517 break; |
517 } | 518 } |
518 default: | 519 default: |
519 break; | 520 break; |
520 } | 521 } |
521 } | 522 } |
522 | 523 |
523 } // namespace chromeos | 524 } // namespace chromeos |
OLD | NEW |