Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: chrome/browser/chromeos/boot_times_loader.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chrome_to_mobile_service.cc ('k') | chrome/browser/chromeos/enrollment_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698