win: Implement setSkipTaskbar.
This commit is contained in:
parent
70d3365414
commit
d4e9518ec6
1 changed files with 12 additions and 0 deletions
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#include "atom/browser/native_window_win.h"
|
#include "atom/browser/native_window_win.h"
|
||||||
|
|
||||||
|
#include <shobjidl.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -14,6 +16,7 @@
|
||||||
#include "atom/common/options_switches.h"
|
#include "atom/common/options_switches.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
|
#include "base/win/scoped_comptr.h"
|
||||||
#include "content/public/browser/native_web_keyboard_event.h"
|
#include "content/public/browser/native_web_keyboard_event.h"
|
||||||
#include "content/public/browser/render_view_host.h"
|
#include "content/public/browser/render_view_host.h"
|
||||||
#include "content/public/browser/render_widget_host_view.h"
|
#include "content/public/browser/render_widget_host_view.h"
|
||||||
|
@ -396,6 +399,15 @@ void NativeWindowWin::FlashFrame(bool flash) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowWin::SetSkipTaskbar(bool skip) {
|
void NativeWindowWin::SetSkipTaskbar(bool skip) {
|
||||||
|
base::win::ScopedComPtr<ITaskbarList> taskbar;
|
||||||
|
if (FAILED(taskbar.CreateInstance(CLSID_TaskbarList, NULL,
|
||||||
|
CLSCTX_INPROC_SERVER)) ||
|
||||||
|
FAILED(taskbar->HrInit()))
|
||||||
|
return;
|
||||||
|
if (skip)
|
||||||
|
taskbar->DeleteTab(GetNativeWindow());
|
||||||
|
else
|
||||||
|
taskbar->AddTab(GetNativeWindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowWin::SetKiosk(bool kiosk) {
|
void NativeWindowWin::SetKiosk(bool kiosk) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue