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

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

Issue 10538039: Renamed BrowserWindow::GetNativeHandle() to GetNativeWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update copyrights Created 8 years, 6 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_finder.h" 5 #include "chrome/browser/ui/browser_finder.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/browser_list.h" 8 #include "chrome/browser/ui/browser_list.h"
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" 10 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 if ((*i)->session_id().id() == desired_id) 142 if ((*i)->session_id().id() == desired_id)
143 return *i; 143 return *i;
144 } 144 }
145 return NULL; 145 return NULL;
146 } 146 }
147 147
148 Browser* FindBrowserWithWindow(gfx::NativeWindow window) { 148 Browser* FindBrowserWithWindow(gfx::NativeWindow window) {
149 for (BrowserList::const_iterator it = BrowserList::begin(); 149 for (BrowserList::const_iterator it = BrowserList::begin();
150 it != BrowserList::end(); ++it) { 150 it != BrowserList::end(); ++it) {
151 Browser* browser = *it; 151 Browser* browser = *it;
152 if (browser->window() && browser->window()->GetNativeHandle() == window) 152 if (browser->window() && browser->window()->GetNativeWindow() == window)
153 return browser; 153 return browser;
154 } 154 }
155 return NULL; 155 return NULL;
156 } 156 }
157 157
158 Browser* FindBrowserWithWebContents(WebContents* web_contents) { 158 Browser* FindBrowserWithWebContents(WebContents* web_contents) {
159 DCHECK(web_contents); 159 DCHECK(web_contents);
160 for (TabContentsIterator it; !it.done(); ++it) { 160 for (TabContentsIterator it; !it.done(); ++it) {
161 if (it->web_contents() == web_contents) 161 if (it->web_contents() == web_contents)
162 return it.browser(); 162 return it.browser();
(...skipping 27 matching lines...) Expand all
190 190
191 size_t GetBrowserCount(Profile* profile) { 191 size_t GetBrowserCount(Profile* profile) {
192 return GetBrowserCountImpl(profile, kMatchAny); 192 return GetBrowserCountImpl(profile, kMatchAny);
193 } 193 }
194 194
195 size_t GetTabbedBrowserCount(Profile* profile) { 195 size_t GetTabbedBrowserCount(Profile* profile) {
196 return GetBrowserCountImpl(profile, kMatchTabbed); 196 return GetBrowserCountImpl(profile, kMatchTabbed);
197 } 197 }
198 198
199 } // namespace browser 199 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698