| 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 } | 422 } |
| 423 | 423 |
| 424 void Panel::Deactivate() { | 424 void Panel::Deactivate() { |
| 425 native_panel_->DeactivatePanel(); | 425 native_panel_->DeactivatePanel(); |
| 426 } | 426 } |
| 427 | 427 |
| 428 bool Panel::IsActive() const { | 428 bool Panel::IsActive() const { |
| 429 return native_panel_->IsPanelActive(); | 429 return native_panel_->IsPanelActive(); |
| 430 } | 430 } |
| 431 | 431 |
| 432 void Panel::SetDraggableRegion(SkRegion* region) { | |
| 433 } | |
| 434 | |
| 435 void Panel::FlashFrame(bool draw_attention) { | 432 void Panel::FlashFrame(bool draw_attention) { |
| 436 if (IsDrawingAttention() == draw_attention || !panel_strip_) | 433 if (IsDrawingAttention() == draw_attention || !panel_strip_) |
| 437 return; | 434 return; |
| 438 | 435 |
| 439 // Don't draw attention for an active panel. | 436 // Don't draw attention for an active panel. |
| 440 if (draw_attention && IsActive()) | 437 if (draw_attention && IsActive()) |
| 441 return; | 438 return; |
| 442 | 439 |
| 443 // Invoking native panel to draw attention must be done before informing the | 440 // Invoking native panel to draw attention must be done before informing the |
| 444 // panel strip because it needs to check internal state of the panel to | 441 // panel strip because it needs to check internal state of the panel to |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 | 748 |
| 752 void Panel::LoadingStateChanged(bool is_loading) { | 749 void Panel::LoadingStateChanged(bool is_loading) { |
| 753 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); | 750 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); |
| 754 native_panel_->UpdatePanelLoadingAnimations(is_loading); | 751 native_panel_->UpdatePanelLoadingAnimations(is_loading); |
| 755 UpdateTitleBar(); | 752 UpdateTitleBar(); |
| 756 } | 753 } |
| 757 | 754 |
| 758 void Panel::WebContentsFocused(content::WebContents* contents) { | 755 void Panel::WebContentsFocused(content::WebContents* contents) { |
| 759 native_panel_->PanelWebContentsFocused(contents); | 756 native_panel_->PanelWebContentsFocused(contents); |
| 760 } | 757 } |
| OLD | NEW |