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.h" | 5 #include "chrome/browser/ui/panels/panel.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 299 |
300 void Panel::Minimize() { | 300 void Panel::Minimize() { |
301 if (collection_) | 301 if (collection_) |
302 collection_->MinimizePanel(this); | 302 collection_->MinimizePanel(this); |
303 } | 303 } |
304 | 304 |
305 bool Panel::IsMinimizedBySystem() const { | 305 bool Panel::IsMinimizedBySystem() const { |
306 return native_panel_->IsPanelMinimizedBySystem(); | 306 return native_panel_->IsPanelMinimizedBySystem(); |
307 } | 307 } |
308 | 308 |
| 309 void Panel::ShowShadow(bool show) { |
| 310 native_panel_->ShowShadow(show); |
| 311 } |
| 312 |
309 void Panel::Restore() { | 313 void Panel::Restore() { |
310 if (collection_) | 314 if (collection_) |
311 collection_->RestorePanel(this); | 315 collection_->RestorePanel(this); |
312 } | 316 } |
313 | 317 |
314 void Panel::SetBounds(const gfx::Rect& bounds) { | 318 void Panel::SetBounds(const gfx::Rect& bounds) { |
315 // Ignore bounds position as the panel manager controls all positioning. | 319 // Ignore bounds position as the panel manager controls all positioning. |
316 if (!collection_) | 320 if (!collection_) |
317 return; | 321 return; |
318 collection_->ResizePanelWindow(this, bounds.size()); | 322 collection_->ResizePanelWindow(this, bounds.size()); |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 | 883 |
880 // static | 884 // static |
881 void Panel::FormatTitleForDisplay(string16* title) { | 885 void Panel::FormatTitleForDisplay(string16* title) { |
882 size_t current_index = 0; | 886 size_t current_index = 0; |
883 size_t match_index; | 887 size_t match_index; |
884 while ((match_index = title->find(L'\n', current_index)) != string16::npos) { | 888 while ((match_index = title->find(L'\n', current_index)) != string16::npos) { |
885 title->replace(match_index, 1, string16()); | 889 title->replace(match_index, 1, string16()); |
886 current_index = match_index; | 890 current_index = match_index; |
887 } | 891 } |
888 } | 892 } |
OLD | NEW |