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

Unified Diff: remoting/client/plugin/chromoting_instance.h

Issue 2034393004: Allow multiple logging::LogMessage{Handler,Listener}s Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 3 years, 11 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
« no previous file with comments | « net/tools/stress_cache/stress_cache.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_instance.h
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h
index 9a8f169df10e1db810c385ab0674751d9c16641e..b687921f1a88d33bd4ea0f216dcd100a1e0f7dd2 100644
--- a/remoting/client/plugin/chromoting_instance.h
+++ b/remoting/client/plugin/chromoting_instance.h
@@ -63,6 +63,7 @@ class PepperAudioPlayer;
class ChromotingClient;
class ClientContext;
class DelegatingSignalStrategy;
+class LogToUI;
class PepperAudioPlayer;
class PepperMouseLocker;
@@ -135,12 +136,12 @@ class ChromotingInstance : public ClientUserInterface,
void OnVideoFrameDirtyRegion(
const webrtc::DesktopRegion& dirty_region) override;
- // Registers a global log message handler that redirects the log output to
+ // Registers a global log message listener that redirects the log output to
// our plugin instance.
// This is called by the plugin's PPP_InitializeModule.
// Note that no logging will be processed unless a ChromotingInstance has been
// registered for logging (see RegisterLoggingInstance).
- static void RegisterLogMessageHandler();
+ static void RegisterLogMessageListener();
// Registers this instance so it processes messages sent by the global log
// message handler. This overwrites any previously registered instance.
@@ -151,12 +152,6 @@ class ChromotingInstance : public ClientUserInterface,
// then the currently registered instance will stay in effect.
void UnregisterLoggingInstance();
- // A Log Message Handler that is called after each LOG message has been
- // processed. This must be of type LogMessageHandlerFunction defined in
- // base/logging.h.
- static bool LogToUI(int severity, const char* file, int line,
- size_t message_start, const std::string& str);
-
// Requests the webapp to fetch a third-party token.
void FetchThirdPartyToken(
const std::string& host_public_key,
@@ -292,6 +287,8 @@ class ChromotingInstance : public ClientUserInterface,
// Weak reference to this instance, used for global logging and task posting.
base::WeakPtrFactory<ChromotingInstance> weak_factory_;
+ std::unique_ptr<LogToUI> log_to_ui_;
+
DISALLOW_COPY_AND_ASSIGN(ChromotingInstance);
};
« no previous file with comments | « net/tools/stress_cache/stress_cache.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698