| 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 native_panel_->ShowPanel(); | 411 native_panel_->ShowPanel(); |
| 412 } | 412 } |
| 413 | 413 |
| 414 void Panel::ShowInactive() { | 414 void Panel::ShowInactive() { |
| 415 if (manager()->display_settings_provider()->is_full_screen() || !panel_strip_) | 415 if (manager()->display_settings_provider()->is_full_screen() || !panel_strip_) |
| 416 return; | 416 return; |
| 417 | 417 |
| 418 native_panel_->ShowPanelInactive(); | 418 native_panel_->ShowPanelInactive(); |
| 419 } | 419 } |
| 420 | 420 |
| 421 void Panel::Hide() { |
| 422 // Not implemented. |
| 423 } |
| 424 |
| 421 void Panel::SetBounds(const gfx::Rect& bounds) { | 425 void Panel::SetBounds(const gfx::Rect& bounds) { |
| 422 // Ignore bounds position as the panel manager controls all positioning. | 426 // Ignore bounds position as the panel manager controls all positioning. |
| 423 if (!panel_strip_) | 427 if (!panel_strip_) |
| 424 return; | 428 return; |
| 425 panel_strip_->ResizePanelWindow(this, bounds.size()); | 429 panel_strip_->ResizePanelWindow(this, bounds.size()); |
| 426 SetAutoResizable(false); | 430 SetAutoResizable(false); |
| 427 } | 431 } |
| 428 | 432 |
| 429 // Close() may be called multiple times if the panel window is not ready to | 433 // Close() may be called multiple times if the panel window is not ready to |
| 430 // close on the first attempt. | 434 // close on the first attempt. |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 app_icon_ = image; | 839 app_icon_ = image; |
| 836 native_panel_->UpdatePanelTitleBar(); | 840 native_panel_->UpdatePanelTitleBar(); |
| 837 } | 841 } |
| 838 app_icon_loader_.reset(); | 842 app_icon_loader_.reset(); |
| 839 | 843 |
| 840 content::NotificationService::current()->Notify( | 844 content::NotificationService::current()->Notify( |
| 841 chrome::NOTIFICATION_PANEL_APP_ICON_LOADED, | 845 chrome::NOTIFICATION_PANEL_APP_ICON_LOADED, |
| 842 content::Source<Panel>(this), | 846 content::Source<Panel>(this), |
| 843 content::NotificationService::NoDetails()); | 847 content::NotificationService::NoDetails()); |
| 844 } | 848 } |
| OLD | NEW |