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

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

Issue 22871007: Revert 217768 "Adding key press detection in the browser process." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 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 "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/file_util.h" 10 #include "base/file_util.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "content/public/browser/browser_shutdown.h" 45 #include "content/public/browser/browser_shutdown.h"
46 #include "content/public/browser/compositor_util.h" 46 #include "content/public/browser/compositor_util.h"
47 #include "content/public/browser/content_browser_client.h" 47 #include "content/public/browser/content_browser_client.h"
48 #include "content/public/browser/render_process_host.h" 48 #include "content/public/browser/render_process_host.h"
49 #include "content/public/common/content_switches.h" 49 #include "content/public/common/content_switches.h"
50 #include "content/public/common/main_function_params.h" 50 #include "content/public/common/main_function_params.h"
51 #include "content/public/common/result_codes.h" 51 #include "content/public/common/result_codes.h"
52 #include "crypto/nss_util.h" 52 #include "crypto/nss_util.h"
53 #include "media/audio/audio_manager.h" 53 #include "media/audio/audio_manager.h"
54 #include "media/base/media.h" 54 #include "media/base/media.h"
55 #include "media/base/user_input_monitor.h"
56 #include "media/midi/midi_manager.h" 55 #include "media/midi/midi_manager.h"
57 #include "net/base/network_change_notifier.h" 56 #include "net/base/network_change_notifier.h"
58 #include "net/socket/client_socket_factory.h" 57 #include "net/socket/client_socket_factory.h"
59 #include "net/ssl/ssl_config_service.h" 58 #include "net/ssl/ssl_config_service.h"
60 #include "ui/base/clipboard/clipboard.h" 59 #include "ui/base/clipboard/clipboard.h"
61 60
62 #if defined(USE_AURA) 61 #if defined(USE_AURA)
63 #include "content/browser/aura/image_transport_factory.h" 62 #include "content/browser/aura/image_transport_factory.h"
64 #endif 63 #endif
65 64
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 // otherwise we'll trigger the assertion about doing IO on the UI thread. 865 // otherwise we'll trigger the assertion about doing IO on the UI thread.
867 GpuDataManagerImpl::GetInstance()->Initialize(); 866 GpuDataManagerImpl::GetInstance()->Initialize();
868 867
869 { 868 {
870 TRACE_EVENT0("startup", 869 TRACE_EVENT0("startup",
871 "BrowserMainLoop::BrowserThreadsStarted:InitSpeechRecognition"); 870 "BrowserMainLoop::BrowserThreadsStarted:InitSpeechRecognition");
872 speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl( 871 speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl(
873 audio_manager_.get(), media_stream_manager_.get())); 872 audio_manager_.get(), media_stream_manager_.get()));
874 } 873 }
875 874
876 {
877 TRACE_EVENT0(
878 "startup",
879 "BrowserMainLoop::BrowserThreadsStarted::InitUserInputMonitor");
880 user_input_monitor_ = media::UserInputMonitor::Create(
881 io_thread_->message_loop_proxy(), main_thread_->message_loop_proxy());
882 }
883
884 // Alert the clipboard class to which threads are allowed to access the 875 // Alert the clipboard class to which threads are allowed to access the
885 // clipboard: 876 // clipboard:
886 std::vector<base::PlatformThreadId> allowed_clipboard_threads; 877 std::vector<base::PlatformThreadId> allowed_clipboard_threads;
887 // The current thread is the UI thread. 878 // The current thread is the UI thread.
888 allowed_clipboard_threads.push_back(base::PlatformThread::CurrentId()); 879 allowed_clipboard_threads.push_back(base::PlatformThread::CurrentId());
889 #if defined(OS_WIN) 880 #if defined(OS_WIN)
890 // On Windows, clipboards are also used on the File or IO threads. 881 // On Windows, clipboards are also used on the File or IO threads.
891 allowed_clipboard_threads.push_back(file_thread_->thread_id()); 882 allowed_clipboard_threads.push_back(file_thread_->thread_id());
892 allowed_clipboard_threads.push_back(io_thread_->thread_id()); 883 allowed_clipboard_threads.push_back(io_thread_->thread_id());
893 #endif 884 #endif
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 if (parameters_.ui_task) 959 if (parameters_.ui_task)
969 base::MessageLoopForUI::current()->PostTask(FROM_HERE, 960 base::MessageLoopForUI::current()->PostTask(FROM_HERE,
970 *parameters_.ui_task); 961 *parameters_.ui_task);
971 962
972 base::RunLoop run_loop; 963 base::RunLoop run_loop;
973 run_loop.Run(); 964 run_loop.Run();
974 #endif 965 #endif
975 } 966 }
976 967
977 } // namespace content 968 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698