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 21 matching lines...) Expand all Loading... |
32 mouse_dragging_(false) { | 32 mouse_dragging_(false) { |
33 } | 33 } |
34 | 34 |
35 PanelBrowserView::~PanelBrowserView() { | 35 PanelBrowserView::~PanelBrowserView() { |
36 } | 36 } |
37 | 37 |
38 void PanelBrowserView::Init() { | 38 void PanelBrowserView::Init() { |
39 BrowserView::Init(); | 39 BrowserView::Init(); |
40 | 40 |
41 GetWidget()->SetAlwaysOnTop(true); | 41 GetWidget()->SetAlwaysOnTop(true); |
42 GetWindow()->non_client_view()->SetAccessibleName( | 42 GetWidget()->non_client_view()->SetAccessibleName( |
43 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 43 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
44 } | 44 } |
45 | 45 |
46 void PanelBrowserView::Close() { | 46 void PanelBrowserView::Close() { |
47 if (!panel_) | 47 if (!panel_) |
48 return; | 48 return; |
49 | 49 |
50 // Cancel any currently running animation since we're closing down. | 50 // Cancel any currently running animation since we're closing down. |
51 if (bounds_animator_.get()) | 51 if (bounds_animator_.get()) |
52 bounds_animator_.reset(); | 52 bounds_animator_.reset(); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 if (!mouse_pressed_) | 159 if (!mouse_pressed_) |
160 return false; | 160 return false; |
161 mouse_pressed_ = false; | 161 mouse_pressed_ = false; |
162 | 162 |
163 if (!mouse_dragging_) | 163 if (!mouse_dragging_) |
164 cancelled = true; | 164 cancelled = true; |
165 mouse_dragging_ = false; | 165 mouse_dragging_ = false; |
166 panel_->manager()->EndDragging(cancelled); | 166 panel_->manager()->EndDragging(cancelled); |
167 return true; | 167 return true; |
168 } | 168 } |
OLD | NEW |