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

Side by Side Diff: content/browser/android/java/gin_java_bridge_dispatcher_host.cc

Issue 1134113002: content/common: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CrOS build. Created 5 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
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_channel_host_factory.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/android/java/gin_java_bridge_dispatcher_host.h" 5 #include "content/browser/android/java/gin_java_bridge_dispatcher_host.h"
6 6
7 #include "base/android/java_handler_thread.h" 7 #include "base/android/java_handler_thread.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 return NULL; 338 return NULL;
339 break; 339 break;
340 } 340 }
341 default: 341 default:
342 NOTREACHED(); 342 NOTREACHED();
343 return NULL; 343 return NULL;
344 } 344 }
345 { 345 {
346 base::AutoLock locker(objects_lock_); 346 base::AutoLock locker(objects_lock_);
347 if (objects_.find(object_id) != objects_.end()) { 347 if (objects_.find(object_id) != objects_.end()) {
348 return g_background_thread.Get().message_loop()->task_runner().get(); 348 return g_background_thread.Get().message_loop()->task_runner().get();
349 } 349 }
350 } 350 }
351 return NULL; 351 return NULL;
352 } 352 }
353 353
354 bool GinJavaBridgeDispatcherHost::OnMessageReceived( 354 bool GinJavaBridgeDispatcherHost::OnMessageReceived(
355 const IPC::Message& message) { 355 const IPC::Message& message) {
356 // We can get here As WebContentsObserver also has OnMessageReceived, 356 // We can get here As WebContentsObserver also has OnMessageReceived,
357 // or because we have not provided a task runner in 357 // or because we have not provided a task runner in
358 // OverrideTaskRunnerForMessage. In either case, just bail out. 358 // OverrideTaskRunnerForMessage. In either case, just bail out.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 if (iter == objects_.end()) 482 if (iter == objects_.end())
483 return; 483 return;
484 JavaObjectWeakGlobalRef ref = 484 JavaObjectWeakGlobalRef ref =
485 RemoveHolderAndAdvanceLocked(GetCurrentRoutingID(), &iter); 485 RemoveHolderAndAdvanceLocked(GetCurrentRoutingID(), &iter);
486 if (!ref.is_empty()) { 486 if (!ref.is_empty()) {
487 RemoveFromRetainedObjectSetLocked(ref); 487 RemoveFromRetainedObjectSetLocked(ref);
488 } 488 }
489 } 489 }
490 490
491 } // namespace content 491 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_channel_host_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698