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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 18572014: Implement Android shared memory data fetcher for Device Motion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@renderer-sync-12June-tryASYNC-2-bis-tryRebase-6
Patch Set: fixed some includes Created 7 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 (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 "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 if (parts_) 458 if (parts_)
459 parts_->PostMainMessageLoopStart(); 459 parts_->PostMainMessageLoopStart();
460 460
461 #if defined(OS_ANDROID) 461 #if defined(OS_ANDROID)
462 { 462 {
463 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTexturePeer") 463 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTexturePeer")
464 SurfaceTexturePeer::InitInstance(new SurfaceTexturePeerBrowserImpl()); 464 SurfaceTexturePeer::InitInstance(new SurfaceTexturePeerBrowserImpl());
465 } 465 }
466 { 466 {
467 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:DataFetcher") 467 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:DataFetcher")
468 DataFetcherImplAndroid::Init(base::android::AttachCurrentThread()); 468 DataFetcherImplAndroid::Register(base::android::AttachCurrentThread());
469 } 469 }
470 #endif 470 #endif
471 471
472 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { 472 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) {
473 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver") 473 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver")
474 memory_observer_.reset(new MemoryObserver()); 474 memory_observer_.reset(new MemoryObserver());
475 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); 475 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get());
476 } 476 }
477 } 477 }
478 478
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 if (parameters_.ui_task) 932 if (parameters_.ui_task)
933 base::MessageLoopForUI::current()->PostTask(FROM_HERE, 933 base::MessageLoopForUI::current()->PostTask(FROM_HERE,
934 *parameters_.ui_task); 934 *parameters_.ui_task);
935 935
936 base::RunLoop run_loop; 936 base::RunLoop run_loop;
937 run_loop.Run(); 937 run_loop.Run();
938 #endif 938 #endif
939 } 939 }
940 940
941 } // namespace content 941 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698