| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/views/frame/opaque_browser_frame_view_layout.h" | 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/profiles/profiles_state.h" | 8 #include "chrome/browser/profiles/profiles_state.h" |
| 9 #include "chrome/browser/ui/views/profiles/avatar_label.h" | 9 #include "chrome/browser/ui/views/profiles/avatar_label.h" |
| 10 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h" | 10 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h" |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 | 668 |
| 669 if (delegate_->IsRegularOrGuestSession() && switches::IsNewAvatarMenu()) | 669 if (delegate_->IsRegularOrGuestSession() && switches::IsNewAvatarMenu()) |
| 670 LayoutNewStyleAvatar(host); | 670 LayoutNewStyleAvatar(host); |
| 671 else | 671 else |
| 672 LayoutAvatar(host); | 672 LayoutAvatar(host); |
| 673 | 673 |
| 674 client_view_bounds_ = CalculateClientAreaBounds( | 674 client_view_bounds_ = CalculateClientAreaBounds( |
| 675 host->width(), host->height()); | 675 host->width(), host->height()); |
| 676 } | 676 } |
| 677 | 677 |
| 678 gfx::Size OpaqueBrowserFrameViewLayout::GetPreferredSize(views::View* host) { | 678 gfx::Size OpaqueBrowserFrameViewLayout::GetPreferredSize( |
| 679 const views::View* host) const { |
| 679 // This is never used; NonClientView::GetPreferredSize() will be called | 680 // This is never used; NonClientView::GetPreferredSize() will be called |
| 680 // instead. | 681 // instead. |
| 681 NOTREACHED(); | 682 NOTREACHED(); |
| 682 return gfx::Size(); | 683 return gfx::Size(); |
| 683 } | 684 } |
| 684 | 685 |
| 685 void OpaqueBrowserFrameViewLayout::ViewAdded(views::View* host, | 686 void OpaqueBrowserFrameViewLayout::ViewAdded(views::View* host, |
| 686 views::View* view) { | 687 views::View* view) { |
| 687 SetView(view->id(), view); | 688 SetView(view->id(), view); |
| 688 } | 689 } |
| 689 | 690 |
| 690 void OpaqueBrowserFrameViewLayout::ViewRemoved(views::View* host, | 691 void OpaqueBrowserFrameViewLayout::ViewRemoved(views::View* host, |
| 691 views::View* view) { | 692 views::View* view) { |
| 692 SetView(view->id(), NULL); | 693 SetView(view->id(), NULL); |
| 693 } | 694 } |
| OLD | NEW |