Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ui / views / widget / desktop_aura / desktop_window_tree_host_win.cc
index 2fc499b..3d701b6 100644 (file)
@@ -436,6 +436,10 @@ bool DesktopWindowTreeHostWin::IsAnimatingClosed() const {
 ////////////////////////////////////////////////////////////////////////////////
 // DesktopWindowTreeHostWin, WindowTreeHost implementation:
 
+ui::EventSource* DesktopWindowTreeHostWin::GetEventSource() {
+  return this;
+}
+
 gfx::AcceleratedWidget DesktopWindowTreeHostWin::GetAcceleratedWidget() {
   return message_handler_->hwnd();
 }
@@ -449,10 +453,6 @@ void DesktopWindowTreeHostWin::Hide() {
     message_handler_->Hide();
 }
 
-void DesktopWindowTreeHostWin::ToggleFullScreen() {
-  SetWindowTransparency();
-}
-
 // GetBounds and SetBounds work in pixel coordinates, whereas other get/set
 // methods work in DIP.
 
@@ -500,13 +500,6 @@ void DesktopWindowTreeHostWin::SetBounds(const gfx::Rect& bounds) {
     HandleClientSizeChanged(new_expanded.size());
 }
 
-gfx::Insets DesktopWindowTreeHostWin::GetInsets() const {
-  return gfx::Insets();
-}
-
-void DesktopWindowTreeHostWin::SetInsets(const gfx::Insets& insets) {
-}
-
 gfx::Point DesktopWindowTreeHostWin::GetLocationOnNativeScreen() const {
   return GetBounds().origin();
 }
@@ -519,30 +512,6 @@ void DesktopWindowTreeHostWin::ReleaseCapture() {
   message_handler_->ReleaseCapture();
 }
 
-bool DesktopWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
-  aura::client::CursorClient* cursor_client =
-      aura::client::GetCursorClient(window());
-  if (cursor_client && !cursor_client->IsMouseEventsEnabled()) {
-    *location_return = gfx::Point(0, 0);
-    return false;
-  }
-  POINT pt = {0};
-  ::GetCursorPos(&pt);
-  *location_return =
-      gfx::Point(static_cast<int>(pt.x), static_cast<int>(pt.y));
-  return true;
-}
-
-bool DesktopWindowTreeHostWin::ConfineCursorToRootWindow() {
-  RECT window_rect = window()->GetBoundsInScreen().ToRECT();
-  ::ClipCursor(&window_rect);
-  return true;
-}
-
-void DesktopWindowTreeHostWin::UnConfineCursor() {
-  ::ClipCursor(NULL);
-}
-
 void DesktopWindowTreeHostWin::PostNativeEvent(
     const base::NativeEvent& native_event) {
 }
@@ -637,22 +606,6 @@ bool DesktopWindowTreeHostWin::WidgetSizeIsClientSize() const {
   return IsMaximized() || (widget && widget->ShouldUseNativeFrame());
 }
 
-bool DesktopWindowTreeHostWin::CanSaveFocus() const {
-  return GetWidget()->is_top_level();
-}
-
-void DesktopWindowTreeHostWin::SaveFocusOnDeactivate() {
-  GetWidget()->GetFocusManager()->StoreFocusedView(true);
-}
-
-void DesktopWindowTreeHostWin::RestoreFocusOnActivate() {
-  RestoreFocusOnEnable();
-}
-
-void DesktopWindowTreeHostWin::RestoreFocusOnEnable() {
-  GetWidget()->GetFocusManager()->RestoreFocusedView();
-}
-
 bool DesktopWindowTreeHostWin::IsModal() const {
   return native_widget_delegate_->IsModal();
 }
@@ -954,6 +907,11 @@ bool DesktopWindowTreeHostWin::HandleScrollEvent(
   return event.handled();
 }
 
+void DesktopWindowTreeHostWin::HandleWindowSizeChanging() {
+  if (compositor())
+    compositor()->FinishAllRendering();
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // DesktopWindowTreeHostWin, private: