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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/tab_contents/tab_util.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_util.cc
diff --git a/chrome/browser/tab_contents/tab_util.cc b/chrome/browser/tab_contents/tab_util.cc
index cef319d4fd018f26ae5d59dd679cbcb6b2d7bc3e..da8c963af77f65e120dd77ad01b7e6f9d59dcc94 100644
--- a/chrome/browser/tab_contents/tab_util.cc
+++ b/chrome/browser/tab_contents/tab_util.cc
@@ -1,19 +1,30 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/tab_contents/tab_util.h"
+#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-TabContents* tab_util::GetTabContentsByID(int render_process_id,
- int render_view_id) {
+TabContents* tab_util::GetTabContentsByID(int render_process_host_id,
+ int routing_id) {
RenderViewHost* render_view_host =
- RenderViewHost::FromID(render_process_id, render_view_id);
+ RenderViewHost::FromID(render_process_host_id, routing_id);
if (!render_view_host)
return NULL;
return render_view_host->delegate()->GetAsTabContents();
}
+
+TabContentsWrapper* tab_util::GetTabContentsWrapperByID(
jam 2011/05/13 06:22:02 note: we want to get rid of GetAsTabContents() sin
+ int render_process_host_id, int routing_id) {
+ TabContents* tab = GetTabContentsByID(render_process_host_id, routing_id);
+ if (!tab)
+ return NULL;
+
+ return TabContentsWrapper::GetCurrentWrapperForContents(tab);
+}
+
« 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