Move atom_desktop_window_tree_host_win to atom/browser/ui/win directory.
This commit is contained in:
parent
ad01a1731a
commit
dfd076a3e5
3 changed files with 5 additions and 5 deletions
44
atom/browser/ui/win/atom_desktop_window_tree_host_win.cc
Normal file
44
atom/browser/ui/win/atom_desktop_window_tree_host_win.cc
Normal file
|
@ -0,0 +1,44 @@
|
|||
// Copyright (c) 2015 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "atom/browser/ui/win/atom_desktop_window_tree_host_win.h"
|
||||
#include "atom/browser/ui/win/thumbar_host.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
AtomDesktopWindowTreeHostWin::AtomDesktopWindowTreeHostWin(
|
||||
views::internal::NativeWidgetDelegate* native_widget_delegate,
|
||||
views::DesktopNativeWidgetAura* desktop_native_widget_aura)
|
||||
: views::DesktopWindowTreeHostWin(native_widget_delegate,
|
||||
desktop_native_widget_aura) {
|
||||
}
|
||||
|
||||
AtomDesktopWindowTreeHostWin::~AtomDesktopWindowTreeHostWin() {
|
||||
}
|
||||
|
||||
bool AtomDesktopWindowTreeHostWin::SetThumbarButtons(
|
||||
HWND window,
|
||||
const std::vector<ThumbarHost::ThumbarButton>& buttons) {
|
||||
if (!thumbar_host_.get()) {
|
||||
thumbar_host_.reset(new ThumbarHost(window));
|
||||
}
|
||||
return thumbar_host_->SetThumbarButtons(buttons);
|
||||
}
|
||||
|
||||
bool AtomDesktopWindowTreeHostWin::PreHandleMSG(UINT message,
|
||||
WPARAM w_param,
|
||||
LPARAM l_param,
|
||||
LRESULT* result) {
|
||||
switch (message) {
|
||||
case WM_COMMAND: {
|
||||
int id = LOWORD(w_param);
|
||||
if (thumbar_host_ && thumbar_host_->HandleThumbarButtonEvent(id))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace atom
|
41
atom/browser/ui/win/atom_desktop_window_tree_host_win.h
Normal file
41
atom/browser/ui/win/atom_desktop_window_tree_host_win.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
// Copyright (c) 2015 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ATOM_BROWSER_UI_WIN_ATOM_DESKTOP_WINDOW_TREE_HOST_WIN_H_
|
||||
#define ATOM_BROWSER_UI_WIN_ATOM_DESKTOP_WINDOW_TREE_HOST_WIN_H_
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "atom/browser/ui/win/thumbar_host.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
class AtomDesktopWindowTreeHostWin : public views::DesktopWindowTreeHostWin {
|
||||
public:
|
||||
AtomDesktopWindowTreeHostWin(
|
||||
views::internal::NativeWidgetDelegate* native_widget_delegate,
|
||||
views::DesktopNativeWidgetAura* desktop_native_widget_aura);
|
||||
~AtomDesktopWindowTreeHostWin();
|
||||
|
||||
bool SetThumbarButtons(
|
||||
HWND window,
|
||||
const std::vector<ThumbarHost::ThumbarButton>& buttons);
|
||||
|
||||
protected:
|
||||
bool PreHandleMSG(UINT message,
|
||||
WPARAM w_param,
|
||||
LPARAM l_param,
|
||||
LRESULT* result) override;
|
||||
|
||||
private:
|
||||
scoped_ptr<ThumbarHost> thumbar_host_;
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
|
||||
#endif // ATOM_BROWSER_UI_WIN_ATOM_DESKTOP_WINDOW_TREE_HOST_WIN_H_
|
Loading…
Add table
Add a link
Reference in a new issue