OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_prefs.h" | 8 #include "chrome/browser/extensions/extension_prefs.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 void Panel::RequestRenderViewHostToDisableScrollbars( | 529 void Panel::RequestRenderViewHostToDisableScrollbars( |
530 RenderViewHost* render_view_host) { | 530 RenderViewHost* render_view_host) { |
531 DCHECK(render_view_host); | 531 DCHECK(render_view_host); |
532 | 532 |
533 gfx::Size non_client_size = native_panel_->GetNonClientAreaExtent(); | 533 gfx::Size non_client_size = native_panel_->GetNonClientAreaExtent(); |
534 render_view_host->DisableScrollbarsForThreshold( | 534 render_view_host->DisableScrollbarsForThreshold( |
535 gfx::Size(max_size_.width() - non_client_size.width(), | 535 gfx::Size(max_size_.width() - non_client_size.width(), |
536 max_size_.height() - non_client_size.height())); | 536 max_size_.height() - non_client_size.height())); |
537 } | 537 } |
538 | 538 |
| 539 void Panel::OnNonClientAreaSizeKnown() { |
| 540 RequestRenderViewHostToDisableScrollbars(GetRenderViewHost()); |
| 541 } |
| 542 |
539 Browser* Panel::browser() const { | 543 Browser* Panel::browser() const { |
540 return native_panel_->GetPanelBrowser(); | 544 return native_panel_->GetPanelBrowser(); |
541 } | 545 } |
542 | 546 |
543 void Panel::DestroyBrowser() { | 547 void Panel::DestroyBrowser() { |
544 native_panel_->DestroyPanelBrowser(); | 548 native_panel_->DestroyPanelBrowser(); |
545 } | 549 } |
OLD | NEW |