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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { | 570 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { |
563 panel_mouse_watcher_.reset(watcher); | 571 panel_mouse_watcher_.reset(watcher); |
564 } | 572 } |
565 | 573 |
566 void PanelManager::OnPanelAnimationEnded(Panel* panel) { | 574 void PanelManager::OnPanelAnimationEnded(Panel* panel) { |
567 content::NotificationService::current()->Notify( | 575 content::NotificationService::current()->Notify( |
568 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, | 576 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, |
569 content::Source<Panel>(panel), | 577 content::Source<Panel>(panel), |
570 content::NotificationService::NoDetails()); | 578 content::NotificationService::NoDetails()); |
571 } | 579 } |
OLD | NEW |