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

Side by Side Diff: chrome/browser/tab_contents/tab_util.cc

Issue 6973035: Move download stuff to download tab helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment tweak Created 9 years, 7 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/tab_contents/tab_util.h ('k') | chrome/browser/ui/browser.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tab_contents/tab_util.h" 5 #include "chrome/browser/tab_contents/tab_util.h"
6 6
7 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
7 #include "content/browser/renderer_host/render_process_host.h" 8 #include "content/browser/renderer_host/render_process_host.h"
8 #include "content/browser/renderer_host/render_view_host.h" 9 #include "content/browser/renderer_host/render_view_host.h"
9 #include "content/browser/tab_contents/tab_contents.h" 10 #include "content/browser/tab_contents/tab_contents.h"
10 11
11 TabContents* tab_util::GetTabContentsByID(int render_process_id, 12 TabContents* tab_util::GetTabContentsByID(int render_process_host_id,
12 int render_view_id) { 13 int routing_id) {
13 RenderViewHost* render_view_host = 14 RenderViewHost* render_view_host =
14 RenderViewHost::FromID(render_process_id, render_view_id); 15 RenderViewHost::FromID(render_process_host_id, routing_id);
15 if (!render_view_host) 16 if (!render_view_host)
16 return NULL; 17 return NULL;
17 18
18 return render_view_host->delegate()->GetAsTabContents(); 19 return render_view_host->delegate()->GetAsTabContents();
19 } 20 }
21
22 TabContentsWrapper* tab_util::GetTabContentsWrapperByID(
jam 2011/05/13 06:22:02 note: we want to get rid of GetAsTabContents() sin
23 int render_process_host_id, int routing_id) {
24 TabContents* tab = GetTabContentsByID(render_process_host_id, routing_id);
25 if (!tab)
26 return NULL;
27
28 return TabContentsWrapper::GetCurrentWrapperForContents(tab);
29 }
30
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_util.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698