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/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/ui/panels/panel.h" | 8 #include "chrome/browser/ui/panels/panel.h" |
9 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" | 9 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" |
10 #include "chrome/browser/ui/panels/panel_manager.h" | 10 #include "chrome/browser/ui/panels/panel_manager.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 ui::WindowShowState* show_state) const { | 112 ui::WindowShowState* show_state) const { |
113 *bounds = GetPanelBounds(); | 113 *bounds = GetPanelBounds(); |
114 *show_state = ui::SHOW_STATE_NORMAL; | 114 *show_state = ui::SHOW_STATE_NORMAL; |
115 return true; | 115 return true; |
116 } | 116 } |
117 | 117 |
118 void PanelBrowserView::OnWidgetActivationChanged(views::Widget* widget, | 118 void PanelBrowserView::OnWidgetActivationChanged(views::Widget* widget, |
119 bool active) { | 119 bool active) { |
120 ::BrowserView::OnWidgetActivationChanged(widget, active); | 120 ::BrowserView::OnWidgetActivationChanged(widget, active); |
121 | 121 |
122 #if defined(OS_WIN) | 122 #if defined(USE_AURA) |
| 123 // TODO(beng): |
| 124 NOTIMPLEMENTED(); |
| 125 bool focused = active; |
| 126 #elif defined(OS_WIN) |
123 // The panel window is in focus (actually accepting keystrokes) if it is | 127 // The panel window is in focus (actually accepting keystrokes) if it is |
124 // active and belongs to a foreground application. | 128 // active and belongs to a foreground application. |
125 bool focused = active && | 129 bool focused = active && |
126 GetFrameView()->GetWidget()->GetNativeView() == ::GetForegroundWindow(); | 130 GetFrameView()->GetWidget()->GetNativeView() == ::GetForegroundWindow(); |
127 #else | 131 #else |
128 // TODO(jianli): Investigate focus behavior for ChromeOS | 132 // TODO(jianli): Investigate focus behavior for ChromeOS |
129 bool focused = active; | 133 bool focused = active; |
130 #endif | 134 #endif |
131 | 135 |
132 if (focused_ == focused) | 136 if (focused_ == focused) |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 panel_browser_view_->mouse_pressed_point_.y() + delta_y)); | 436 panel_browser_view_->mouse_pressed_point_.y() + delta_y)); |
433 } | 437 } |
434 | 438 |
435 void NativePanelTestingWin::CancelDragTitlebar() { | 439 void NativePanelTestingWin::CancelDragTitlebar() { |
436 panel_browser_view_->OnTitlebarMouseCaptureLost(); | 440 panel_browser_view_->OnTitlebarMouseCaptureLost(); |
437 } | 441 } |
438 | 442 |
439 void NativePanelTestingWin::FinishDragTitlebar() { | 443 void NativePanelTestingWin::FinishDragTitlebar() { |
440 panel_browser_view_->OnTitlebarMouseReleased(); | 444 panel_browser_view_->OnTitlebarMouseReleased(); |
441 } | 445 } |
OLD | NEW |