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

Unified Diff: content/browser/browser_main_loop.cc

Issue 21183002: Adding key press detection in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 1c6b1a033ebb75395447ad15d59d8b2dd3c35984..2f29698484684292593e3cbc353d8230b14303c3 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -49,6 +49,7 @@
#include "content/public/common/result_codes.h"
#include "crypto/nss_util.h"
#include "media/audio/audio_manager.h"
+#include "media/audio/key_press_monitor.h"
#include "media/base/media.h"
#include "media/midi/midi_manager.h"
#include "net/base/network_change_notifier.h"
@@ -864,6 +865,15 @@ int BrowserMainLoop::BrowserThreadsStarted() {
audio_manager_.get(), media_stream_manager_.get()));
}
+ {
+ TRACE_EVENT0("startup",
+ "BrowserMainLoop::BrowserThreadsStarted::InitKeyPressMonitor");
+ key_press_monitor_.reset(
+ new media::KeyPressMonitor(audio_manager_->GetMessageLoop(),
+ io_thread_->message_loop_proxy(),
+ main_thread_->message_loop_proxy()));
+ }
+
// Alert the clipboard class to which threads are allowed to access the
// clipboard:
std::vector<base::PlatformThreadId> allowed_clipboard_threads;

Powered by Google App Engine
This is Rietveld 408576698