OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/views/panels/panel_stack_view.h" | 5 #include "chrome/browser/ui/views/panels/panel_stack_view.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/panels/panel.h" | 10 #include "chrome/browser/ui/panels/panel.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // added to the stack because we need the information from that panel. | 63 // added to the stack because we need the information from that panel. |
64 if (delay_initialized_) | 64 if (delay_initialized_) |
65 return; | 65 return; |
66 Panel* panel = stacked_collection_->top_panel(); | 66 Panel* panel = stacked_collection_->top_panel(); |
67 if (!panel) | 67 if (!panel) |
68 return; | 68 return; |
69 delay_initialized_ = true; | 69 delay_initialized_ = true; |
70 | 70 |
71 #if defined(OS_WIN) | 71 #if defined(OS_WIN) |
72 ui::win::SetAppIdForWindow( | 72 ui::win::SetAppIdForWindow( |
73 ShellIntegration::GetAppModelIdForProfile( | 73 ShellIntegration::GetAppModelIdForProfile(UTF8ToWide(panel->app_name()), |
74 base::UTF8ToWide(panel->app_name()), | 74 panel->profile()->GetPath()), |
75 panel->profile()->GetPath()), | |
76 chrome::HWNDForWidget(window_)); | 75 chrome::HWNDForWidget(window_)); |
77 #endif | 76 #endif |
78 } | 77 } |
79 | 78 |
80 void PanelStackView::Close() { | 79 void PanelStackView::Close() { |
81 window_->Close(); | 80 window_->Close(); |
82 } | 81 } |
83 | 82 |
84 void PanelStackView::OnPanelAddedOrRemoved(Panel* panel) { | 83 void PanelStackView::OnPanelAddedOrRemoved(Panel* panel) { |
85 EnsureInitialized(); | 84 EnsureInitialized(); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 // All the windows that share the same owner window will appear as a single | 196 // All the windows that share the same owner window will appear as a single |
198 // window on the taskbar. | 197 // window on the taskbar. |
199 ::SetWindowLongPtr(panel_window, | 198 ::SetWindowLongPtr(panel_window, |
200 GWLP_HWNDPARENT, | 199 GWLP_HWNDPARENT, |
201 reinterpret_cast<LONG>(stack_window)); | 200 reinterpret_cast<LONG>(stack_window)); |
202 | 201 |
203 #else | 202 #else |
204 NOTIMPLEMENTED(); | 203 NOTIMPLEMENTED(); |
205 #endif | 204 #endif |
206 } | 205 } |
OLD | NEW |