Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / remoting / host / desktop_session_agent.cc
index 1f75d94..fd01bfd 100644 (file)
@@ -4,7 +4,7 @@
 
 #include "remoting/host/desktop_session_agent.h"
 
-#include "base/file_util.h"
+#include "base/files/file_util.h"
 #include "base/logging.h"
 #include "base/memory/shared_memory.h"
 #include "ipc/ipc_channel_proxy.h"
@@ -25,8 +25,8 @@
 #include "remoting/proto/event.pb.h"
 #include "remoting/protocol/clipboard_stub.h"
 #include "remoting/protocol/input_event_tracker.h"
-#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
+#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor.h"
 #include "third_party/webrtc/modules/desktop_capture/shared_memory.h"
 
@@ -120,10 +120,10 @@ DesktopSessionAgent::DesktopSessionAgent(
       input_task_runner_(input_task_runner),
       io_task_runner_(io_task_runner),
       video_capture_task_runner_(video_capture_task_runner),
-      control_factory_(this),
       next_shared_buffer_id_(1),
       shared_buffers_(0),
-      started_(false) {
+      started_(false),
+      weak_factory_(this) {
   DCHECK(caller_task_runner_->BelongsToCurrentThread());
 }
 
@@ -268,7 +268,7 @@ void DesktopSessionAgent::OnStartSessionAgent(
 
   // Create a desktop environment for the new session.
   desktop_environment_ = delegate_->desktop_environment_factory().Create(
-      control_factory_.GetWeakPtr());
+      weak_factory_.GetWeakPtr());
 
   // Create the session controller and set the initial screen resolution.
   screen_controls_ = desktop_environment_->CreateScreenControls();
@@ -407,7 +407,7 @@ void DesktopSessionAgent::Stop() {
     started_ = false;
 
     // Ignore any further callbacks.
-    control_factory_.InvalidateWeakPtrs();
+    weak_factory_.InvalidateWeakPtrs();
     client_jid_.clear();
 
     remote_input_filter_.reset();