Index: remoting/client/plugin/chromoting_instance.h |
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h |
index 787713a17444475d22a447edeb93c5881619a4f3..e7008936557ae7e32c32bb0ca70fe1c9611fe383 100644 |
--- a/remoting/client/plugin/chromoting_instance.h |
+++ b/remoting/client/plugin/chromoting_instance.h |
@@ -21,11 +21,8 @@ |
#include "ppapi/cpp/private/instance_private.h" |
#include "remoting/client/client_context.h" |
#include "remoting/client/plugin/chromoting_scriptable_object.h" |
-#include "remoting/client/plugin/pepper_client_logger.h" |
#include "remoting/protocol/connection_to_host.h" |
-class MessageLoop; |
- |
namespace base { |
class Thread; |
} // namespace base |
@@ -49,6 +46,7 @@ class JingleThread; |
class PepperView; |
class PepperViewProxy; |
class RectangleUpdateDecoder; |
+class TaskThreadProxy; |
struct ClientConfig; |
@@ -88,9 +86,6 @@ class ChromotingInstance : public pp::InstancePrivate { |
// Called by ChromotingScriptableObject to set scale-to-fit. |
void SetScaleToFit(bool scale_to_fit); |
- void Log(int severity, const char* format, ...); |
- void VLog(int verboselevel, const char* format, ...); |
- |
// Return statistics record by ChromotingClient. |
// If no connection is currently active then NULL will be returned. |
ChromotingStats* GetStats(); |
@@ -99,6 +94,11 @@ class ChromotingInstance : public pp::InstancePrivate { |
bool DoScaling() const { return scale_to_fit_; } |
+ // 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); |
private: |
FRIEND_TEST_ALL_PREFIXES(ChromotingInstanceTest, TestCaseSetup); |
@@ -109,6 +109,8 @@ class ChromotingInstance : public pp::InstancePrivate { |
bool IsNatTraversalAllowed(const std::string& policy_json); |
void HandlePolicyUpdate(const std::string policy_json); |
+ void ProcessLogToUI(const std::string& message); |
+ |
bool initialized_; |
ClientContext context_; |
@@ -118,13 +120,16 @@ class ChromotingInstance : public pp::InstancePrivate { |
// True if scale to fit is enabled. |
bool scale_to_fit_; |
+ // A refcounted class to perform thread-switching for logging tasks. |
+ scoped_refptr<TaskThreadProxy> log_proxy_; |
+ |
// PepperViewProxy is refcounted and used to interface between chromoting |
// objects and PepperView and perform thread switching. It wraps around |
// |view_| and receives method calls on chromoting threads. These method |
// calls are then delegates on the pepper thread. During destruction of |
// ChromotingInstance we need to detach PepperViewProxy from PepperView since |
// both ChromotingInstance and PepperView are destroyed and there will be |
- // outstanding tasks on the pepper message loo. |
+ // outstanding tasks on the pepper message loop. |
scoped_refptr<PepperViewProxy> view_proxy_; |
scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_; |
scoped_ptr<InputHandler> input_handler_; |
@@ -136,8 +141,6 @@ class ChromotingInstance : public pp::InstancePrivate { |
// connection. |
scoped_refptr<PepperXmppProxy> xmpp_proxy_; |
- PepperClientLogger logger_; |
- |
// JavaScript interface to control this instance. |
// This wraps a ChromotingScriptableObject in a pp::Var. |
pp::Var instance_object_; |