| 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" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 if (web_contents) { | 44 if (web_contents) { |
| 45 RenderWidgetHostView* render_widget_host_view = | 45 RenderWidgetHostView* render_widget_host_view = |
| 46 web_contents->GetRenderWidgetHostView(); | 46 web_contents->GetRenderWidgetHostView(); |
| 47 if (render_widget_host_view) | 47 if (render_widget_host_view) |
| 48 return render_widget_host_view->GetRenderWidgetHost(); | 48 return render_widget_host_view->GetRenderWidgetHost(); |
| 49 } | 49 } |
| 50 return NULL; | 50 return NULL; |
| 51 } | 51 } |
| 52 | 52 |
| 53 const std::string GetTabUrl(RenderWidgetHost* rwh) { | 53 const std::string GetTabUrl(RenderWidgetHost* rwh) { |
| 54 RenderWidgetHostView* rwhv = rwh->view(); | 54 RenderWidgetHostView* rwhv = rwh->GetView(); |
| 55 for (BrowserList::const_iterator it = BrowserList::begin(); | 55 for (BrowserList::const_iterator it = BrowserList::begin(); |
| 56 it != BrowserList::end(); | 56 it != BrowserList::end(); |
| 57 ++it) { | 57 ++it) { |
| 58 Browser* browser = *it; | 58 Browser* browser = *it; |
| 59 for (int i = 0, tab_count = browser->tab_count(); i < tab_count; ++i) { | 59 for (int i = 0, tab_count = browser->tab_count(); i < tab_count; ++i) { |
| 60 WebContents* tab = browser->GetWebContentsAt(i); | 60 WebContents* tab = browser->GetWebContentsAt(i); |
| 61 if (tab->GetRenderWidgetHostView() == rwhv) { | 61 if (tab->GetRenderWidgetHostView() == rwhv) { |
| 62 return tab->GetURL().spec(); | 62 return tab->GetURL().spec(); |
| 63 } | 63 } |
| 64 } | 64 } |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 GetRenderWidgetHost(&web_contents->GetController()); | 510 GetRenderWidgetHost(&web_contents->GetController()); |
| 511 render_widget_hosts_loading_.erase(render_widget_host); | 511 render_widget_hosts_loading_.erase(render_widget_host); |
| 512 break; | 512 break; |
| 513 } | 513 } |
| 514 default: | 514 default: |
| 515 break; | 515 break; |
| 516 } | 516 } |
| 517 } | 517 } |
| 518 | 518 |
| 519 } // namespace chromeos | 519 } // namespace chromeos |
| OLD | NEW |