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/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 } | 260 } |
261 | 261 |
262 ui::WindowShowState Panel::GetRestoredState() const { | 262 ui::WindowShowState Panel::GetRestoredState() const { |
263 return ui::SHOW_STATE_NORMAL; | 263 return ui::SHOW_STATE_NORMAL; |
264 } | 264 } |
265 | 265 |
266 gfx::Rect Panel::GetBounds() const { | 266 gfx::Rect Panel::GetBounds() const { |
267 return native_panel_->GetPanelBounds(); | 267 return native_panel_->GetPanelBounds(); |
268 } | 268 } |
269 | 269 |
270 void Panel::Show() { | 270 void Panel::Show(bool user_gesture) { |
271 if (manager()->display_settings_provider()->is_full_screen() || !collection_) | 271 if (manager()->display_settings_provider()->is_full_screen() || !collection_) |
272 return; | 272 return; |
273 | 273 |
274 native_panel_->ShowPanel(); | 274 native_panel_->ShowPanel(); |
275 } | 275 } |
276 | 276 |
277 void Panel::Hide() { | 277 void Panel::Hide() { |
278 // Not implemented. | 278 // Not implemented. |
279 } | 279 } |
280 | 280 |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 // static | 890 // static |
891 void Panel::FormatTitleForDisplay(base::string16* title) { | 891 void Panel::FormatTitleForDisplay(base::string16* title) { |
892 size_t current_index = 0; | 892 size_t current_index = 0; |
893 size_t match_index; | 893 size_t match_index; |
894 while ((match_index = title->find(L'\n', current_index)) != | 894 while ((match_index = title->find(L'\n', current_index)) != |
895 base::string16::npos) { | 895 base::string16::npos) { |
896 title->replace(match_index, 1, base::string16()); | 896 title->replace(match_index, 1, base::string16()); |
897 current_index = match_index; | 897 current_index = match_index; |
898 } | 898 } |
899 } | 899 } |
OLD | NEW |