| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 return false; | 123 return false; |
| 124 } | 124 } |
| 125 #endif // USE_X11 && !OS_CHROMEOS | 125 #endif // USE_X11 && !OS_CHROMEOS |
| 126 | 126 |
| 127 // Without --enable-panels, only support Hangouts. | 127 // Without --enable-panels, only support Hangouts. |
| 128 for (const char* id : extension_misc::kHangoutsExtensionIds) { | 128 for (const char* id : extension_misc::kHangoutsExtensionIds) { |
| 129 if (extension_id == id) | 129 if (extension_id == id) |
| 130 return true; | 130 return true; |
| 131 } | 131 } |
| 132 | 132 |
| 133 #if defined(OS_CHROMEOS) |
| 134 // Without --enable-panels, only support IME extensions on Chrome OS. |
| 135 for (const char* id : extension_misc::kIMEExtensionIds) { |
| 136 if (extension_id == id) |
| 137 return true; |
| 138 } |
| 139 #endif |
| 140 |
| 133 return false; | 141 return false; |
| 134 } | 142 } |
| 135 | 143 |
| 136 // static | 144 // static |
| 137 bool PanelManager::IsPanelStackingEnabled() { | 145 bool PanelManager::IsPanelStackingEnabled() { |
| 138 // Stacked panel mode is not supported in linux-aura. | 146 // Stacked panel mode is not supported in linux-aura. |
| 139 #if defined(OS_LINUX) | 147 #if defined(OS_LINUX) |
| 140 return false; | 148 return false; |
| 141 #else | 149 #else |
| 142 return true; | 150 return true; |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { | 568 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { |
| 561 panel_mouse_watcher_.reset(watcher); | 569 panel_mouse_watcher_.reset(watcher); |
| 562 } | 570 } |
| 563 | 571 |
| 564 void PanelManager::OnPanelAnimationEnded(Panel* panel) { | 572 void PanelManager::OnPanelAnimationEnded(Panel* panel) { |
| 565 content::NotificationService::current()->Notify( | 573 content::NotificationService::current()->Notify( |
| 566 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, | 574 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, |
| 567 content::Source<Panel>(panel), | 575 content::Source<Panel>(panel), |
| 568 content::NotificationService::NoDetails()); | 576 content::NotificationService::NoDetails()); |
| 569 } | 577 } |
| OLD | NEW |