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