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

Side by Side Diff: chrome/browser/ui/browser_tab_restore_service_delegate.cc

Issue 11434074: browser: Move FindBrowserWithWebContents() into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/ui/browser_tab_restore_service_delegate.h" 5 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h"
6 6
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_commands.h" 8 #include "chrome/browser/ui/browser_commands.h"
9 #include "chrome/browser/ui/browser_finder.h" 9 #include "chrome/browser/ui/browser_finder.h"
10 #include "chrome/browser/ui/browser_tabrestore.h" 10 #include "chrome/browser/ui/browser_tabrestore.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 if (browser) 99 if (browser)
100 return browser->tab_restore_service_delegate(); 100 return browser->tab_restore_service_delegate();
101 else 101 else
102 return NULL; 102 return NULL;
103 } 103 }
104 104
105 // static 105 // static
106 TabRestoreServiceDelegate* 106 TabRestoreServiceDelegate*
107 TabRestoreServiceDelegate::FindDelegateForWebContents( 107 TabRestoreServiceDelegate::FindDelegateForWebContents(
108 const WebContents* contents) { 108 const WebContents* contents) {
109 Browser* browser = browser::FindBrowserWithWebContents(contents); 109 Browser* browser = chrome::FindBrowserWithWebContents(contents);
110 return browser ? browser->tab_restore_service_delegate() : NULL; 110 return browser ? browser->tab_restore_service_delegate() : NULL;
111 } 111 }
112 112
113 // static 113 // static
114 TabRestoreServiceDelegate* TabRestoreServiceDelegate::FindDelegateWithID( 114 TabRestoreServiceDelegate* TabRestoreServiceDelegate::FindDelegateWithID(
115 SessionID::id_type desired_id) { 115 SessionID::id_type desired_id) {
116 Browser* browser = browser::FindBrowserWithID(desired_id); 116 Browser* browser = browser::FindBrowserWithID(desired_id);
117 return browser ? browser->tab_restore_service_delegate() : NULL; 117 return browser ? browser->tab_restore_service_delegate() : NULL;
118 } 118 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_finder.cc ('k') | chrome/browser/ui/cocoa/constrained_window/constrained_window_mac2.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698