atom_desktop_window_tree_host_win.cc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (c) 2015 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #include "atom/browser/ui/win/atom_desktop_window_tree_host_win.h"
  5. #include "atom/browser/ui/win/message_handler_delegate.h"
  6. namespace atom {
  7. AtomDesktopWindowTreeHostWin::AtomDesktopWindowTreeHostWin(
  8. MessageHandlerDelegate* delegate,
  9. views::internal::NativeWidgetDelegate* native_widget_delegate,
  10. views::DesktopNativeWidgetAura* desktop_native_widget_aura)
  11. : views::DesktopWindowTreeHostWin(native_widget_delegate,
  12. desktop_native_widget_aura),
  13. delegate_(delegate) {}
  14. AtomDesktopWindowTreeHostWin::~AtomDesktopWindowTreeHostWin() {}
  15. bool AtomDesktopWindowTreeHostWin::PreHandleMSG(UINT message,
  16. WPARAM w_param,
  17. LPARAM l_param,
  18. LRESULT* result) {
  19. return delegate_->PreHandleMSG(message, w_param, l_param, result);
  20. }
  21. bool AtomDesktopWindowTreeHostWin::HasNativeFrame() const {
  22. // Since we never use chromium's titlebar implementation, we can just say
  23. // that we use a native titlebar. This will disable the repaint locking when
  24. // DWM composition is disabled.
  25. return true;
  26. }
  27. } // namespace atom