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(UTF8ToWide(panel->app_name()), | 73 ShellIntegration::GetAppModelIdForProfile( |
74 panel->profile()->GetPath()), | 74 base::UTF8ToWide(panel->app_name()), |
| 75 panel->profile()->GetPath()), |
75 chrome::HWNDForWidget(window_)); | 76 chrome::HWNDForWidget(window_)); |
76 #endif | 77 #endif |
77 } | 78 } |
78 | 79 |
79 void PanelStackView::Close() { | 80 void PanelStackView::Close() { |
80 window_->Close(); | 81 window_->Close(); |
81 } | 82 } |
82 | 83 |
83 void PanelStackView::OnPanelAddedOrRemoved(Panel* panel) { | 84 void PanelStackView::OnPanelAddedOrRemoved(Panel* panel) { |
84 EnsureInitialized(); | 85 EnsureInitialized(); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 // All the windows that share the same owner window will appear as a single | 197 // All the windows that share the same owner window will appear as a single |
197 // window on the taskbar. | 198 // window on the taskbar. |
198 ::SetWindowLongPtr(panel_window, | 199 ::SetWindowLongPtr(panel_window, |
199 GWLP_HWNDPARENT, | 200 GWLP_HWNDPARENT, |
200 reinterpret_cast<LONG>(stack_window)); | 201 reinterpret_cast<LONG>(stack_window)); |
201 | 202 |
202 #else | 203 #else |
203 NOTIMPLEMENTED(); | 204 NOTIMPLEMENTED(); |
204 #endif | 205 #endif |
205 } | 206 } |
OLD | NEW |