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

Side by Side Diff: chrome/browser/android/tab_android.cc

Issue 2088443003: Shortcut ctrl+shift+T added on android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit fixes based on review. Created 4 years, 5 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/android/tab_android.h" 5 #include "chrome/browser/android/tab_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 using base::android::AttachCurrentThread; 92 using base::android::AttachCurrentThread;
93 using base::android::ConvertUTF8ToJavaString; 93 using base::android::ConvertUTF8ToJavaString;
94 using content::BrowserThread; 94 using content::BrowserThread;
95 using content::GlobalRequestID; 95 using content::GlobalRequestID;
96 using content::NavigationController; 96 using content::NavigationController;
97 using content::WebContents; 97 using content::WebContents;
98 using navigation_interception::InterceptNavigationDelegate; 98 using navigation_interception::InterceptNavigationDelegate;
99 using navigation_interception::NavigationParams; 99 using navigation_interception::NavigationParams;
100 100
101 TabAndroid* TabAndroid::FromWebContents(content::WebContents* web_contents) { 101 TabAndroid* TabAndroid::FromWebContents(
102 CoreTabHelper* core_tab_helper = CoreTabHelper::FromWebContents(web_contents); 102 const content::WebContents* web_contents) {
103 const CoreTabHelper* core_tab_helper = CoreTabHelper::FromWebContents(
104 web_contents);
103 if (!core_tab_helper) 105 if (!core_tab_helper)
104 return NULL; 106 return NULL;
105 107
106 CoreTabHelperDelegate* core_delegate = core_tab_helper->delegate(); 108 CoreTabHelperDelegate* core_delegate = core_tab_helper->delegate();
107 if (!core_delegate) 109 if (!core_delegate)
108 return NULL; 110 return NULL;
109 111
110 return static_cast<TabAndroid*>(core_delegate); 112 return static_cast<TabAndroid*>(core_delegate);
111 } 113 }
112 114
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 static void Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { 904 static void Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
903 TRACE_EVENT0("native", "TabAndroid::Init"); 905 TRACE_EVENT0("native", "TabAndroid::Init");
904 // This will automatically bind to the Java object and pass ownership there. 906 // This will automatically bind to the Java object and pass ownership there.
905 new TabAndroid(env, obj); 907 new TabAndroid(env, obj);
906 } 908 }
907 909
908 // static 910 // static
909 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) { 911 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) {
910 return RegisterNativesImpl(env); 912 return RegisterNativesImpl(env);
911 } 913 }
OLDNEW
« no previous file with comments | « chrome/browser/android/tab_android.h ('k') | chrome/browser/sessions/chrome_tab_restore_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698