OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_browser_view.h" | 5 #include "chrome/browser/ui/panels/panel_browser_view.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "chrome/browser/ui/panels/panel.h" | 9 #include "chrome/browser/ui/panels/panel.h" |
10 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" | 10 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 StopDrawingAttention(); | 172 StopDrawingAttention(); |
173 } | 173 } |
174 | 174 |
175 content::NotificationService::current()->Notify( | 175 content::NotificationService::current()->Notify( |
176 chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS, | 176 chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS, |
177 content::Source<Panel>(panel()), | 177 content::Source<Panel>(panel()), |
178 content::NotificationService::NoDetails()); | 178 content::NotificationService::NoDetails()); |
179 } | 179 } |
180 | 180 |
181 bool PanelBrowserView::AcceleratorPressed( | 181 bool PanelBrowserView::AcceleratorPressed( |
182 const views::Accelerator& accelerator) { | 182 const ui::Accelerator& accelerator) { |
183 if (mouse_pressed_ && accelerator.key_code() == ui::VKEY_ESCAPE) { | 183 if (mouse_pressed_ && accelerator.key_code() == ui::VKEY_ESCAPE) { |
184 OnTitlebarMouseCaptureLost(); | 184 OnTitlebarMouseCaptureLost(); |
185 return true; | 185 return true; |
186 } | 186 } |
187 | 187 |
188 // No other accelerator is allowed when the drag begins. | 188 // No other accelerator is allowed when the drag begins. |
189 if (mouse_dragging_state_ == DRAGGING_STARTED) | 189 if (mouse_dragging_state_ == DRAGGING_STARTED) |
190 return true; | 190 return true; |
191 | 191 |
192 return BrowserView::AcceleratorPressed(accelerator); | 192 return BrowserView::AcceleratorPressed(accelerator); |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 } | 542 } |
543 | 543 |
544 bool NativePanelTestingWin::IsWindowSizeKnown() const { | 544 bool NativePanelTestingWin::IsWindowSizeKnown() const { |
545 return true; | 545 return true; |
546 } | 546 } |
547 | 547 |
548 bool NativePanelTestingWin::IsAnimatingBounds() const { | 548 bool NativePanelTestingWin::IsAnimatingBounds() const { |
549 return panel_browser_view_->bounds_animator_.get() && | 549 return panel_browser_view_->bounds_animator_.get() && |
550 panel_browser_view_->bounds_animator_->is_animating(); | 550 panel_browser_view_->bounds_animator_->is_animating(); |
551 } | 551 } |
OLD | NEW |