| 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 // See Panel::OnTitlebarClicked(). | 566 // See Panel::OnTitlebarClicked(). |
| 567 if (active && IsDrawingAttention() && !IsMinimized()) | 567 if (active && IsDrawingAttention() && !IsMinimized()) |
| 568 FlashFrame(false); | 568 FlashFrame(false); |
| 569 | 569 |
| 570 if (panel_strip_) | 570 if (panel_strip_) |
| 571 panel_strip_->OnPanelActiveStateChanged(this); | 571 panel_strip_->OnPanelActiveStateChanged(this); |
| 572 | 572 |
| 573 content::NotificationService::current()->Notify( | 573 content::NotificationService::current()->Notify( |
| 574 chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS, | 574 chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS, |
| 575 content::Source<Panel>(this), | 575 content::Source<Panel>(this), |
| 576 content::NotificationService::NoDetails()); | 576 content::Details<bool>(&active)); |
| 577 } | 577 } |
| 578 | 578 |
| 579 void Panel::ConfigureAutoResize(content::WebContents* web_contents) { | 579 void Panel::ConfigureAutoResize(content::WebContents* web_contents) { |
| 580 if (!auto_resizable_ || !web_contents) | 580 if (!auto_resizable_ || !web_contents) |
| 581 return; | 581 return; |
| 582 | 582 |
| 583 // NULL might be returned if the tab has not been added. | 583 // NULL might be returned if the tab has not been added. |
| 584 RenderViewHost* render_view_host = web_contents->GetRenderViewHost(); | 584 RenderViewHost* render_view_host = web_contents->GetRenderViewHost(); |
| 585 if (!render_view_host) | 585 if (!render_view_host) |
| 586 return; | 586 return; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 | 678 |
| 679 void Panel::UpdateTitleBar() { | 679 void Panel::UpdateTitleBar() { |
| 680 native_panel_->UpdatePanelTitleBar(); | 680 native_panel_->UpdatePanelTitleBar(); |
| 681 } | 681 } |
| 682 | 682 |
| 683 void Panel::LoadingStateChanged(bool is_loading) { | 683 void Panel::LoadingStateChanged(bool is_loading) { |
| 684 native_panel_->UpdatePanelLoadingAnimations(is_loading); | 684 native_panel_->UpdatePanelLoadingAnimations(is_loading); |
| 685 UpdateTitleBar(); | 685 UpdateTitleBar(); |
| 686 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); | 686 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); |
| 687 } | 687 } |
| OLD | NEW |