OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/frame/header_view.h" | 5 #include "ash/frame/header_view.h" |
6 | 6 |
7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" | 7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" |
8 #include "ash/frame/default_header_painter.h" | 8 #include "ash/frame/default_header_painter.h" |
9 #include "ash/session/session_state_delegate.h" | 9 #include "ash/session/session_state_delegate.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // HeaderView, ShellObserver overrides: | 139 // HeaderView, ShellObserver overrides: |
140 | 140 |
141 void HeaderView::OnOverviewModeStarting() { | 141 void HeaderView::OnOverviewModeStarting() { |
142 caption_button_container_->SetVisible(false); | 142 caption_button_container_->SetVisible(false); |
143 } | 143 } |
144 | 144 |
145 void HeaderView::OnOverviewModeEnded() { | 145 void HeaderView::OnOverviewModeEnded() { |
146 caption_button_container_->SetVisible(true); | 146 caption_button_container_->SetVisible(true); |
147 } | 147 } |
148 | 148 |
149 void HeaderView::OnMaximizeModeStarted() { | 149 void HeaderView::OnTabletModeStarted() { |
150 caption_button_container_->UpdateSizeButtonVisibility(); | 150 caption_button_container_->UpdateSizeButtonVisibility(); |
151 parent()->Layout(); | 151 parent()->Layout(); |
152 } | 152 } |
153 | 153 |
154 void HeaderView::OnMaximizeModeEnded() { | 154 void HeaderView::OnTabletModeEnded() { |
155 caption_button_container_->UpdateSizeButtonVisibility(); | 155 caption_button_container_->UpdateSizeButtonVisibility(); |
156 parent()->Layout(); | 156 parent()->Layout(); |
157 } | 157 } |
158 | 158 |
159 views::View* HeaderView::avatar_icon() const { | 159 views::View* HeaderView::avatar_icon() const { |
160 return avatar_icon_; | 160 return avatar_icon_; |
161 } | 161 } |
162 | 162 |
163 /////////////////////////////////////////////////////////////////////////////// | 163 /////////////////////////////////////////////////////////////////////////////// |
164 // HeaderView, | 164 // HeaderView, |
(...skipping 29 matching lines...) Expand all Loading... |
194 gfx::Rect visible_bounds(GetVisibleBounds()); | 194 gfx::Rect visible_bounds(GetVisibleBounds()); |
195 gfx::Point visible_origin_in_screen(visible_bounds.origin()); | 195 gfx::Point visible_origin_in_screen(visible_bounds.origin()); |
196 views::View::ConvertPointToScreen(this, &visible_origin_in_screen); | 196 views::View::ConvertPointToScreen(this, &visible_origin_in_screen); |
197 std::vector<gfx::Rect> bounds_in_screen; | 197 std::vector<gfx::Rect> bounds_in_screen; |
198 bounds_in_screen.push_back( | 198 bounds_in_screen.push_back( |
199 gfx::Rect(visible_origin_in_screen, visible_bounds.size())); | 199 gfx::Rect(visible_origin_in_screen, visible_bounds.size())); |
200 return bounds_in_screen; | 200 return bounds_in_screen; |
201 } | 201 } |
202 | 202 |
203 } // namespace ash | 203 } // namespace ash |
OLD | NEW |