Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: chrome/browser/ui/panels/panel.cc

Issue 8110003: Show avatar menu from NTP4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 NOTIMPLEMENTED(); 481 NOTIMPLEMENTED();
482 } 482 }
483 #endif 483 #endif
484 484
485 void Panel::UpdatePreferredSize(TabContents* tab_contents, 485 void Panel::UpdatePreferredSize(TabContents* tab_contents,
486 const gfx::Size& pref_size) { 486 const gfx::Size& pref_size) {
487 return manager()->OnPreferredWindowSizeChanged(this, 487 return manager()->OnPreferredWindowSizeChanged(this,
488 native_panel_->WindowSizeFromContentSize(pref_size)); 488 native_panel_->WindowSizeFromContentSize(pref_size));
489 } 489 }
490 490
491 void Panel::ShowAvatarBubble(TabContents* tab_contents, const gfx::Rect& rect) {
492 // Panels will never show a new tab page so this should never be called.
493 NOTREACHED();
494 }
495
491 void Panel::Observe(int type, 496 void Panel::Observe(int type,
492 const NotificationSource& source, 497 const NotificationSource& source,
493 const NotificationDetails& details) { 498 const NotificationDetails& details) {
494 switch (type) { 499 switch (type) {
495 case content::NOTIFICATION_TAB_ADDED: 500 case content::NOTIFICATION_TAB_ADDED:
496 // We also need to know when the render view host changes in order 501 // We also need to know when the render view host changes in order
497 // to turn on preferred size changed notifications in the new 502 // to turn on preferred size changed notifications in the new
498 // render view host. However, we cannot register for 503 // render view host. However, we cannot register for
499 // NOTIFICATION_TAB_CONTENTS_SWAPPED until we actually have a 504 // NOTIFICATION_TAB_CONTENTS_SWAPPED until we actually have a
500 // tab content so we register for it here. 505 // tab content so we register for it here.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 RequestRenderViewHostToDisableScrollbars(GetRenderViewHost()); 540 RequestRenderViewHostToDisableScrollbars(GetRenderViewHost());
536 } 541 }
537 542
538 Browser* Panel::browser() const { 543 Browser* Panel::browser() const {
539 return native_panel_->GetPanelBrowser(); 544 return native_panel_->GetPanelBrowser();
540 } 545 }
541 546
542 void Panel::DestroyBrowser() { 547 void Panel::DestroyBrowser() {
543 native_panel_->DestroyPanelBrowser(); 548 native_panel_->DestroyPanelBrowser();
544 } 549 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698