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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 NOTIMPLEMENTED(); | 508 NOTIMPLEMENTED(); |
509 } | 509 } |
510 #endif | 510 #endif |
511 | 511 |
512 void Panel::UpdatePreferredSize(TabContents* tab_contents, | 512 void Panel::UpdatePreferredSize(TabContents* tab_contents, |
513 const gfx::Size& pref_size) { | 513 const gfx::Size& pref_size) { |
514 return manager()->OnPreferredWindowSizeChanged(this, | 514 return manager()->OnPreferredWindowSizeChanged(this, |
515 native_panel_->WindowSizeFromContentSize(pref_size)); | 515 native_panel_->WindowSizeFromContentSize(pref_size)); |
516 } | 516 } |
517 | 517 |
| 518 void Panel::ShowAvatarBubble(TabContents* tab_contents, const gfx::Rect& rect) { |
| 519 // Panels will never show a new tab page so this should never be called. |
| 520 NOTREACHED(); |
| 521 } |
| 522 |
518 void Panel::Observe(int type, | 523 void Panel::Observe(int type, |
519 const NotificationSource& source, | 524 const NotificationSource& source, |
520 const NotificationDetails& details) { | 525 const NotificationDetails& details) { |
521 switch (type) { | 526 switch (type) { |
522 case content::NOTIFICATION_TAB_ADDED: | 527 case content::NOTIFICATION_TAB_ADDED: |
523 // We also need to know when the render view host changes in order | 528 // We also need to know when the render view host changes in order |
524 // to turn on preferred size changed notifications in the new | 529 // to turn on preferred size changed notifications in the new |
525 // render view host. However, we cannot register for | 530 // render view host. However, we cannot register for |
526 // NOTIFICATION_TAB_CONTENTS_SWAPPED until we actually have a | 531 // NOTIFICATION_TAB_CONTENTS_SWAPPED until we actually have a |
527 // tab content so we register for it here. | 532 // tab content so we register for it here. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 RequestRenderViewHostToDisableScrollbars(GetRenderViewHost()); | 567 RequestRenderViewHostToDisableScrollbars(GetRenderViewHost()); |
563 } | 568 } |
564 | 569 |
565 Browser* Panel::browser() const { | 570 Browser* Panel::browser() const { |
566 return native_panel_->GetPanelBrowser(); | 571 return native_panel_->GetPanelBrowser(); |
567 } | 572 } |
568 | 573 |
569 void Panel::DestroyBrowser() { | 574 void Panel::DestroyBrowser() { |
570 native_panel_->DestroyPanelBrowser(); | 575 native_panel_->DestroyPanelBrowser(); |
571 } | 576 } |
OLD | NEW |