| 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 // Panels are an Eraser target. See http://crbug.com/571511 for details. | 134 // Without --enable-panels, only support Hangouts. |
| 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. | |
| 139 for (const char* id : extension_misc::kHangoutsExtensionIds) { | 135 for (const char* id : extension_misc::kHangoutsExtensionIds) { |
| 140 if (extension_id == id) | 136 if (extension_id == id) |
| 141 return true; | 137 return true; |
| 142 } | 138 } |
| 143 #endif // OS_CHROMEOS | |
| 144 | 139 |
| 145 return false; | 140 return false; |
| 146 } | 141 } |
| 147 | 142 |
| 148 // static | 143 // static |
| 149 bool PanelManager::IsPanelStackingEnabled() { | 144 bool PanelManager::IsPanelStackingEnabled() { |
| 150 // Stacked panel mode is not supported in linux-aura. | 145 // Stacked panel mode is not supported in linux-aura. |
| 151 #if defined(OS_LINUX) | 146 #if defined(OS_LINUX) |
| 152 return false; | 147 return false; |
| 153 #else | 148 #else |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { | 569 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { |
| 575 panel_mouse_watcher_.reset(watcher); | 570 panel_mouse_watcher_.reset(watcher); |
| 576 } | 571 } |
| 577 | 572 |
| 578 void PanelManager::OnPanelAnimationEnded(Panel* panel) { | 573 void PanelManager::OnPanelAnimationEnded(Panel* panel) { |
| 579 content::NotificationService::current()->Notify( | 574 content::NotificationService::current()->Notify( |
| 580 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, | 575 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, |
| 581 content::Source<Panel>(panel), | 576 content::Source<Panel>(panel), |
| 582 content::NotificationService::NoDetails()); | 577 content::NotificationService::NoDetails()); |
| 583 } | 578 } |
| OLD | NEW |