OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/panels/panel_manager.h" | 5 #include "chrome/browser/ui/panels/panel_manager.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
124 wm_type != ui::WM_ICE_WM && | 124 wm_type != ui::WM_ICE_WM && |
125 wm_type != ui::WM_KWIN && | 125 wm_type != ui::WM_KWIN && |
126 wm_type != ui::WM_METACITY && | 126 wm_type != ui::WM_METACITY && |
127 wm_type != ui::WM_MUFFIN && | 127 wm_type != ui::WM_MUFFIN && |
128 wm_type != ui::WM_MUTTER && | 128 wm_type != ui::WM_MUTTER && |
129 wm_type != ui::WM_XFWM4) { | 129 wm_type != ui::WM_XFWM4) { |
130 return false; | 130 return false; |
131 } | 131 } |
132 #endif // USE_X11 && !OS_CHROMEOS | 132 #endif // USE_X11 && !OS_CHROMEOS |
133 | 133 |
134 // Without --enable-panels, only support Hangouts. | 134 // Panels are an Eraser target. See http://crbug.com/571511 for details. |
135 // TODO(dimich): remove the rest of Panels code (except ChromeOS) once | |
136 // erasure is stable. | |
137 #if defined(OS_CHROMEOS) | |
138 // Without --enable-panels, only support Hangouts on ChromeOS. | |
stevenjb
2016/06/22 17:08:33
This comment is a bit misleading - Chrome OS does
Dmitry Titov
2016/06/22 17:53:58
It is in fact correct, although I agree not very c
| |
135 for (const char* id : extension_misc::kHangoutsExtensionIds) { | 139 for (const char* id : extension_misc::kHangoutsExtensionIds) { |
136 if (extension_id == id) | 140 if (extension_id == id) |
137 return true; | 141 return true; |
138 } | 142 } |
143 #endif // OS_CHROMEOS | |
139 | 144 |
140 return false; | 145 return false; |
141 } | 146 } |
142 | 147 |
143 // static | 148 // static |
144 bool PanelManager::IsPanelStackingEnabled() { | 149 bool PanelManager::IsPanelStackingEnabled() { |
145 // Stacked panel mode is not supported in linux-aura. | 150 // Stacked panel mode is not supported in linux-aura. |
146 #if defined(OS_LINUX) | 151 #if defined(OS_LINUX) |
147 return false; | 152 return false; |
148 #else | 153 #else |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
569 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { | 574 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { |
570 panel_mouse_watcher_.reset(watcher); | 575 panel_mouse_watcher_.reset(watcher); |
571 } | 576 } |
572 | 577 |
573 void PanelManager::OnPanelAnimationEnded(Panel* panel) { | 578 void PanelManager::OnPanelAnimationEnded(Panel* panel) { |
574 content::NotificationService::current()->Notify( | 579 content::NotificationService::current()->Notify( |
575 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, | 580 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, |
576 content::Source<Panel>(panel), | 581 content::Source<Panel>(panel), |
577 content::NotificationService::NoDetails()); | 582 content::NotificationService::NoDetails()); |
578 } | 583 } |
OLD | NEW |