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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 // panel strip because it needs to check internal state of the panel to | 465 // panel strip because it needs to check internal state of the panel to |
466 // determine if the panel has been drawing attention. | 466 // determine if the panel has been drawing attention. |
467 native_panel_->DrawAttention(draw_attention); | 467 native_panel_->DrawAttention(draw_attention); |
468 panel_strip_->OnPanelAttentionStateChanged(this); | 468 panel_strip_->OnPanelAttentionStateChanged(this); |
469 } | 469 } |
470 | 470 |
471 bool Panel::IsAlwaysOnTop() const { | 471 bool Panel::IsAlwaysOnTop() const { |
472 return native_panel_->IsPanelAlwaysOnTop(); | 472 return native_panel_->IsPanelAlwaysOnTop(); |
473 } | 473 } |
474 | 474 |
| 475 gfx::Rect Panel::ContentBoundsForWindowBounds( |
| 476 const gfx::Rect& window_bounds) const { |
| 477 return window_bounds; |
| 478 } |
| 479 |
| 480 gfx::Rect Panel::WindowBoundsForContentBounds( |
| 481 const gfx::Rect& content_bounds) const { |
| 482 return content_bounds; |
| 483 } |
| 484 |
475 gfx::NativeWindow Panel::GetNativeWindow() { | 485 gfx::NativeWindow Panel::GetNativeWindow() { |
476 return native_panel_->GetNativePanelHandle(); | 486 return native_panel_->GetNativePanelHandle(); |
477 } | 487 } |
478 | 488 |
479 gfx::Rect Panel::GetRestoredBounds() const { | 489 gfx::Rect Panel::GetRestoredBounds() const { |
480 gfx::Rect bounds = native_panel_->GetPanelBounds(); | 490 gfx::Rect bounds = native_panel_->GetPanelBounds(); |
481 bounds.set_y(bounds.bottom() - full_size_.height()); | 491 bounds.set_y(bounds.bottom() - full_size_.height()); |
482 bounds.set_x(bounds.right() - full_size_.width()); | 492 bounds.set_x(bounds.right() - full_size_.width()); |
483 bounds.set_size(full_size_); | 493 bounds.set_size(full_size_); |
484 return bounds; | 494 return bounds; |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 app_icon_ = image; | 848 app_icon_ = image; |
839 native_panel_->UpdatePanelTitleBar(); | 849 native_panel_->UpdatePanelTitleBar(); |
840 } | 850 } |
841 app_icon_loader_.reset(); | 851 app_icon_loader_.reset(); |
842 | 852 |
843 content::NotificationService::current()->Notify( | 853 content::NotificationService::current()->Notify( |
844 chrome::NOTIFICATION_PANEL_APP_ICON_LOADED, | 854 chrome::NOTIFICATION_PANEL_APP_ICON_LOADED, |
845 content::Source<Panel>(this), | 855 content::Source<Panel>(this), |
846 content::NotificationService::NoDetails()); | 856 content::NotificationService::NoDetails()); |
847 } | 857 } |
OLD | NEW |