Index: remoting/client/plugin/chromoting_instance.h |
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h |
index 838f9e9620f8cf9cb9942d8b52977b459fc9c42d..e5d0cd29b6c9db1509daeffadb0eb3a6e1a2747c 100644 |
--- a/remoting/client/plugin/chromoting_instance.h |
+++ b/remoting/client/plugin/chromoting_instance.h |
@@ -19,11 +19,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 |
@@ -47,6 +44,7 @@ class JingleThread; |
class PepperView; |
class PepperViewProxy; |
class RectangleUpdateDecoder; |
+class TaskThreadProxy; |
struct ClientConfig; |
@@ -82,9 +80,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(); |
@@ -93,9 +88,16 @@ 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); |
+ void ProcessLogToUI(const std::string& message); |
+ |
bool initialized_; |
ClientContext context_; |
@@ -105,13 +107,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_; |
@@ -123,8 +128,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_; |