Set updated_rect for frames generated by WindowCapturer implementationsw

Previous updated_rect wasn't set for frames generated by WindowCapturer
implementation. That makes them unustable with chromoting host that
uses update_rect. With that change the frames will always contain
updated_rect that coveras the whole frame.

Change by Ronak Vora <ronakvora@google.com>

R=wez@chromium.org

Review URL: https://webrtc-codereview.appspot.com/22079004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6912 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/desktop_capture/window_capturer_mac.mm b/webrtc/modules/desktop_capture/window_capturer_mac.mm
index f60be5d..e69fc11 100644
--- a/webrtc/modules/desktop_capture/window_capturer_mac.mm
+++ b/webrtc/modules/desktop_capture/window_capturer_mac.mm
@@ -224,6 +224,9 @@
   CFRelease(cf_data);
   CFRelease(window_image);
 
+  frame->mutable_updated_region()->SetRect(
+      DesktopRect::MakeSize(frame->size()));
+
   callback_->OnCaptureCompleted(frame);
 
   if (full_screen_chrome_window_detector_)
diff --git a/webrtc/modules/desktop_capture/window_capturer_win.cc b/webrtc/modules/desktop_capture/window_capturer_win.cc
index a002185..9f19faf 100644
--- a/webrtc/modules/desktop_capture/window_capturer_win.cc
+++ b/webrtc/modules/desktop_capture/window_capturer_win.cc
@@ -251,6 +251,9 @@
 
   previous_size_ = frame->size();
 
+  frame->mutable_updated_region()->SetRect(
+      DesktopRect::MakeSize(frame->size()));
+
   if (!result) {
     LOG(LS_ERROR) << "Both PrintWindow() and BitBlt() failed.";
     frame.reset();
diff --git a/webrtc/modules/desktop_capture/window_capturer_x11.cc b/webrtc/modules/desktop_capture/window_capturer_x11.cc
index b641c93..4945423 100755
--- a/webrtc/modules/desktop_capture/window_capturer_x11.cc
+++ b/webrtc/modules/desktop_capture/window_capturer_x11.cc
@@ -302,6 +302,9 @@
   x_server_pixel_buffer_.CaptureRect(DesktopRect::MakeSize(frame->size()),
                                      frame);
 
+  frame->mutable_updated_region()->SetRect(
+      DesktopRect::MakeSize(frame->size()));
+
   callback_->OnCaptureCompleted(frame);
 }