////////////////////////////////////////////////////////////////////////////////
// DesktopWindowTreeHostWin, WindowTreeHost implementation:
+ui::EventSource* DesktopWindowTreeHostWin::GetEventSource() {
+ return this;
+}
+
gfx::AcceleratedWidget DesktopWindowTreeHostWin::GetAcceleratedWidget() {
return message_handler_->hwnd();
}
message_handler_->Hide();
}
-void DesktopWindowTreeHostWin::ToggleFullScreen() {
- SetWindowTransparency();
-}
-
// GetBounds and SetBounds work in pixel coordinates, whereas other get/set
// methods work in DIP.
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();
}
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) {
}
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();
}
return event.handled();
}
+void DesktopWindowTreeHostWin::HandleWindowSizeChanging() {
+ if (compositor())
+ compositor()->FinishAllRendering();
+}
+
////////////////////////////////////////////////////////////////////////////////
// DesktopWindowTreeHostWin, private: