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/avatar_label.h" | 9 #include "chrome/browser/ui/views/avatar_label.h" |
10 #include "chrome/browser/ui/views/avatar_menu_button.h" | 10 #include "chrome/browser/ui/views/avatar_menu_button.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 trailing_buttons_.push_back(views::FRAME_BUTTON_MAXIMIZE); | 125 trailing_buttons_.push_back(views::FRAME_BUTTON_MAXIMIZE); |
126 trailing_buttons_.push_back(views::FRAME_BUTTON_CLOSE); | 126 trailing_buttons_.push_back(views::FRAME_BUTTON_CLOSE); |
127 } | 127 } |
128 | 128 |
129 OpaqueBrowserFrameViewLayout::~OpaqueBrowserFrameViewLayout() {} | 129 OpaqueBrowserFrameViewLayout::~OpaqueBrowserFrameViewLayout() {} |
130 | 130 |
131 // static | 131 // static |
132 bool OpaqueBrowserFrameViewLayout::ShouldAddDefaultCaptionButtons() { | 132 bool OpaqueBrowserFrameViewLayout::ShouldAddDefaultCaptionButtons() { |
133 #if defined(OS_WIN) | 133 #if defined(OS_WIN) |
134 return !win8::IsSingleWindowMetroMode(); | 134 return !win8::IsSingleWindowMetroMode(); |
135 #endif // OS_WIN | 135 #else |
136 return true; | 136 return true; |
| 137 #endif |
137 } | 138 } |
138 | 139 |
139 void OpaqueBrowserFrameViewLayout::SetButtonOrdering( | 140 void OpaqueBrowserFrameViewLayout::SetButtonOrdering( |
140 const std::vector<views::FrameButton>& leading_buttons, | 141 const std::vector<views::FrameButton>& leading_buttons, |
141 const std::vector<views::FrameButton>& trailing_buttons) { | 142 const std::vector<views::FrameButton>& trailing_buttons) { |
142 leading_buttons_ = leading_buttons; | 143 leading_buttons_ = leading_buttons; |
143 trailing_buttons_ = trailing_buttons; | 144 trailing_buttons_ = trailing_buttons; |
144 } | 145 } |
145 | 146 |
146 gfx::Rect OpaqueBrowserFrameViewLayout::GetBoundsForTabStrip( | 147 gfx::Rect OpaqueBrowserFrameViewLayout::GetBoundsForTabStrip( |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 | 701 |
701 void OpaqueBrowserFrameViewLayout::ViewAdded(views::View* host, | 702 void OpaqueBrowserFrameViewLayout::ViewAdded(views::View* host, |
702 views::View* view) { | 703 views::View* view) { |
703 SetView(view->id(), view); | 704 SetView(view->id(), view); |
704 } | 705 } |
705 | 706 |
706 void OpaqueBrowserFrameViewLayout::ViewRemoved(views::View* host, | 707 void OpaqueBrowserFrameViewLayout::ViewRemoved(views::View* host, |
707 views::View* view) { | 708 views::View* view) { |
708 SetView(view->id(), NULL); | 709 SetView(view->id(), NULL); |
709 } | 710 } |
OLD | NEW |