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

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

Issue 211273007: Split InfoBarService core code into InfoBarManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + comments Created 6 years, 8 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
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/android/tab_android.h" 5 #include "chrome/browser/android/tab_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 bool did_start_load, 222 bool did_start_load,
223 bool did_finish_load) { 223 bool did_finish_load) {
224 JNIEnv* env = base::android::AttachCurrentThread(); 224 JNIEnv* env = base::android::AttachCurrentThread();
225 225
226 // We need to notify the native InfobarContainer so infobars can be swapped. 226 // We need to notify the native InfobarContainer so infobars can be swapped.
227 InfoBarContainerAndroid* infobar_container = 227 InfoBarContainerAndroid* infobar_container =
228 reinterpret_cast<InfoBarContainerAndroid*>( 228 reinterpret_cast<InfoBarContainerAndroid*>(
229 Java_Tab_getNativeInfoBarContainer( 229 Java_Tab_getNativeInfoBarContainer(
230 env, 230 env,
231 weak_java_tab_.get(env).obj())); 231 weak_java_tab_.get(env).obj()));
232 InfoBarService* new_infobar_service = new_contents ? 232 InfoBarManager* new_infobar_manager = new_contents ?
233 InfoBarService::FromWebContents(new_contents) : NULL; 233 InfoBarService::InfoBarManagerFromWebContents(new_contents) : NULL;
234 infobar_container->ChangeInfoBarService(new_infobar_service); 234 infobar_container->ChangeInfoBarManager(new_infobar_manager);
235 235
236 Java_Tab_swapWebContents( 236 Java_Tab_swapWebContents(
237 env, 237 env,
238 weak_java_tab_.get(env).obj(), 238 weak_java_tab_.get(env).obj(),
239 reinterpret_cast<intptr_t>(new_contents), 239 reinterpret_cast<intptr_t>(new_contents),
240 did_start_load, 240 did_start_load,
241 did_finish_load); 241 did_finish_load);
242 } 242 }
243 243
244 void TabAndroid::Observe(int type, 244 void TabAndroid::Observe(int type,
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 512
513 static void Init(JNIEnv* env, jobject obj) { 513 static void Init(JNIEnv* env, jobject obj) {
514 TRACE_EVENT0("native", "TabAndroid::Init"); 514 TRACE_EVENT0("native", "TabAndroid::Init");
515 // This will automatically bind to the Java object and pass ownership there. 515 // This will automatically bind to the Java object and pass ownership there.
516 new TabAndroid(env, obj); 516 new TabAndroid(env, obj);
517 } 517 }
518 518
519 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) { 519 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) {
520 return RegisterNativesImpl(env); 520 return RegisterNativesImpl(env);
521 } 521 }
OLDNEW
« no previous file with comments | « chrome/browser/accessibility/accessibility_extension_api.cc ('k') | chrome/browser/autofill/autofill_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698