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

Unified Diff: chrome/browser/android/tab_android.cc

Issue 11098008: Adding a WindowAndroidHelper class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yaron's nit Created 8 years, 2 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/android/tab_android.h ('k') | chrome/browser/android/tab_base_android_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index ba3ddbbfb193a5605a66ff2cb8a6652c64b9a064..f0009750429e9df599d4d5d07af3cf9feb205538 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -3,16 +3,23 @@
// found in the LICENSE file.
#include "chrome/browser/android/tab_android.h"
+#include "chrome/browser/ui/android/window_android_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "content/public/browser/android/content_view_core.h"
#include "content/public/browser/web_contents.h"
-
TabContents* TabAndroid::GetOrCreateTabContents(
content::WebContents* web_contents) {
TabContents* tab_contents = TabContents::FromWebContents(web_contents);
- return tab_contents ? tab_contents : TabContents::Factory::CreateTabContents(
- web_contents);
+ if (!tab_contents) {
+ tab_contents = TabContents::Factory::CreateTabContents(web_contents);
+ InitTabHelpers(web_contents);
+ }
+ return tab_contents;
+}
+
+void TabAndroid::InitTabHelpers(content::WebContents* web_contents) {
+ WindowAndroidHelper::CreateForWebContents(web_contents);
}
TabContents* TabAndroid::InitTabContentsFromView(JNIEnv* env,
« no previous file with comments | « chrome/browser/android/tab_android.h ('k') | chrome/browser/android/tab_base_android_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698