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

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

Issue 2514633002: Revert of Android: support multiple displays on C++ side (Closed)
Patch Set: Created 4 years, 1 month 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/renderer_host/render_widget_host_unittest.cc » ('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 (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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 #include "content/browser/android/browser_startup_controller.h" 114 #include "content/browser/android/browser_startup_controller.h"
115 #include "content/browser/android/browser_surface_texture_manager.h" 115 #include "content/browser/android/browser_surface_texture_manager.h"
116 #include "content/browser/android/scoped_surface_request_manager.h" 116 #include "content/browser/android/scoped_surface_request_manager.h"
117 #include "content/browser/android/tracing_controller_android.h" 117 #include "content/browser/android/tracing_controller_android.h"
118 #include "content/browser/media/android/browser_media_player_manager.h" 118 #include "content/browser/media/android/browser_media_player_manager.h"
119 #include "content/browser/renderer_host/context_provider_factory_impl_android.h" 119 #include "content/browser/renderer_host/context_provider_factory_impl_android.h"
120 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h" 120 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h"
121 #include "content/public/browser/screen_orientation_provider.h" 121 #include "content/public/browser/screen_orientation_provider.h"
122 #include "gpu/ipc/client/android/in_process_surface_texture_manager.h" 122 #include "gpu/ipc/client/android/in_process_surface_texture_manager.h"
123 #include "media/base/android/media_client_android.h" 123 #include "media/base/android/media_client_android.h"
124 #include "ui/android/screen_android.h"
125 #include "ui/display/screen.h"
126 #include "ui/gl/gl_surface.h" 124 #include "ui/gl/gl_surface.h"
127 #endif 125 #endif
128 126
129 #if defined(OS_MACOSX) 127 #if defined(OS_MACOSX)
130 #include "base/memory/memory_pressure_monitor_mac.h" 128 #include "base/memory/memory_pressure_monitor_mac.h"
131 #include "content/browser/bootstrap_sandbox_manager_mac.h" 129 #include "content/browser/bootstrap_sandbox_manager_mac.h"
132 #include "content/browser/cocoa/system_hotkey_helper_mac.h" 130 #include "content/browser/cocoa/system_hotkey_helper_mac.h"
133 #include "content/browser/mach_broker_mac.h" 131 #include "content/browser/mach_broker_mac.h"
134 #include "content/browser/renderer_host/browser_compositor_view_mac.h" 132 #include "content/browser/renderer_host/browser_compositor_view_mac.h"
135 #include "content/browser/theme_helper_mac.h" 133 #include "content/browser/theme_helper_mac.h"
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 NOTREACHED(); 946 NOTREACHED();
949 } 947 }
950 948
951 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start"); 949 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start");
952 } 950 }
953 created_threads_ = true; 951 created_threads_ = true;
954 return result_code_; 952 return result_code_;
955 } 953 }
956 954
957 int BrowserMainLoop::PreMainMessageLoopRun() { 955 int BrowserMainLoop::PreMainMessageLoopRun() {
958 #if defined(OS_ANDROID)
959 // Let screen instance be overridable by parts.
960 ui::SetScreenAndroid();
961 #endif
962
963 if (parts_) { 956 if (parts_) {
964 TRACE_EVENT0("startup", 957 TRACE_EVENT0("startup",
965 "BrowserMainLoop::CreateThreads:PreMainMessageLoopRun"); 958 "BrowserMainLoop::CreateThreads:PreMainMessageLoopRun");
966 959
967 parts_->PreMainMessageLoopRun(); 960 parts_->PreMainMessageLoopRun();
968 } 961 }
969 962
970 // If the UI thread blocks, the whole UI is unresponsive. 963 // If the UI thread blocks, the whole UI is unresponsive.
971 // Do not allow disk IO from the UI thread. 964 // Do not allow disk IO from the UI thread.
972 base::ThreadRestrictions::SetIOAllowed(false); 965 base::ThreadRestrictions::SetIOAllowed(false);
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1613 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = 1606 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner =
1614 audio_thread_->task_runner(); 1607 audio_thread_->task_runner();
1615 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), 1608 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner),
1616 std::move(worker_task_runner), 1609 std::move(worker_task_runner),
1617 MediaInternals::GetInstance()); 1610 MediaInternals::GetInstance());
1618 } 1611 }
1619 CHECK(audio_manager_); 1612 CHECK(audio_manager_);
1620 } 1613 }
1621 1614
1622 } // namespace content 1615 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698