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.h" | 5 #include "chrome/browser/ui/panels/panel.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/extensions/extension_prefs.h" | 8 #include "chrome/browser/extensions/extension_prefs.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 | 50 |
51 expansion_state_ = new_expansion_state; | 51 expansion_state_ = new_expansion_state; |
52 | 52 |
53 native_panel_->OnPanelExpansionStateChanged(expansion_state_); | 53 native_panel_->OnPanelExpansionStateChanged(expansion_state_); |
54 | 54 |
55 // The minimized panel should not get the focus. | 55 // The minimized panel should not get the focus. |
56 if (expansion_state_ == MINIMIZED) | 56 if (expansion_state_ == MINIMIZED) |
57 Deactivate(); | 57 Deactivate(); |
58 } | 58 } |
59 | 59 |
60 bool Panel::ShouldBringUpTitleBar(int mouse_x, int mouse_y) const { | 60 bool Panel::ShouldBringUpTitlebar(int mouse_x, int mouse_y) const { |
61 // Skip the expanded panel. | 61 // Skip the expanded panel. |
62 if (expansion_state_ == Panel::EXPANDED) | 62 if (expansion_state_ == Panel::EXPANDED) |
63 return false; | 63 return false; |
64 | 64 |
65 // Let the native panel decide. | 65 // Let the native panel decide. |
66 return native_panel_->ShouldBringUpPanelTitleBar(mouse_x, mouse_y); | 66 return native_panel_->ShouldBringUpPanelTitlebar(mouse_x, mouse_y); |
67 } | 67 } |
68 | 68 |
69 bool Panel::IsDrawingAttention() const { | 69 bool Panel::IsDrawingAttention() const { |
70 return native_panel_->IsDrawingAttention(); | 70 return native_panel_->IsDrawingAttention(); |
71 } | 71 } |
72 | 72 |
73 void Panel::Show() { | 73 void Panel::Show() { |
74 native_panel_->ShowPanel(); | 74 native_panel_->ShowPanel(); |
75 } | 75 } |
76 | 76 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
118 StatusBubble* Panel::GetStatusBubble() { | 118 StatusBubble* Panel::GetStatusBubble() { |
119 NOTIMPLEMENTED(); | 119 NOTIMPLEMENTED(); |
120 return NULL; | 120 return NULL; |
121 } | 121 } |
122 | 122 |
123 void Panel::ToolbarSizeChanged(bool is_animating){ | 123 void Panel::ToolbarSizeChanged(bool is_animating){ |
124 NOTIMPLEMENTED(); | 124 NOTIMPLEMENTED(); |
125 } | 125 } |
126 | 126 |
127 void Panel::UpdateTitleBar() { | 127 void Panel::UpdateTitleBar() { |
128 native_panel_->UpdatePanelTitleBar(); | 128 native_panel_->UpdatePanelTitlebar(); |
jianli
2011/08/12 21:34:51
ditto.
prasadt
2011/08/12 21:59:30
Done.
| |
129 } | 129 } |
130 | 130 |
131 void Panel::BookmarkBarStateChanged( | 131 void Panel::BookmarkBarStateChanged( |
132 BookmarkBar::AnimateChangeType change_type) { | 132 BookmarkBar::AnimateChangeType change_type) { |
133 NOTIMPLEMENTED(); | 133 NOTIMPLEMENTED(); |
134 } | 134 } |
135 | 135 |
136 void Panel::UpdateDevTools() { | 136 void Panel::UpdateDevTools() { |
137 NOTIMPLEMENTED(); | 137 NOTIMPLEMENTED(); |
138 } | 138 } |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
427 } | 427 } |
428 #endif | 428 #endif |
429 | 429 |
430 Browser* Panel::browser() const { | 430 Browser* Panel::browser() const { |
431 return native_panel_->GetPanelBrowser(); | 431 return native_panel_->GetPanelBrowser(); |
432 } | 432 } |
433 | 433 |
434 void Panel::DestroyBrowser() { | 434 void Panel::DestroyBrowser() { |
435 native_panel_->DestroyPanelBrowser(); | 435 native_panel_->DestroyPanelBrowser(); |
436 } | 436 } |
OLD | NEW |