Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser_header_painter_ash.h" | 5 #include "chrome/browser/ui/views/frame/browser_header_painter_ash.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/header_painter_util.h" | 8 #include "ash/frame/header_painter_util.h" |
| 9 #include "base/logging.h" // DCHECK | 9 #include "base/logging.h" // DCHECK |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 257 } | 257 } |
| 258 | 258 |
| 259 void BrowserHeaderPainterAsh::SetHeaderHeightForPainting(int height) { | 259 void BrowserHeaderPainterAsh::SetHeaderHeightForPainting(int height) { |
| 260 painted_height_ = height; | 260 painted_height_ = height; |
| 261 } | 261 } |
| 262 | 262 |
| 263 void BrowserHeaderPainterAsh::SchedulePaintForTitle() { | 263 void BrowserHeaderPainterAsh::SchedulePaintForTitle() { |
| 264 view_->SchedulePaintInRect(GetTitleBounds()); | 264 view_->SchedulePaintInRect(GetTitleBounds()); |
| 265 } | 265 } |
| 266 | 266 |
| 267 void BrowserHeaderPainterAsh::UpdateLeftViewXInset(int left_view_x_inset) { | |
| 268 // Not implemented. | |
|
pkotwicz
2014/08/14 01:59:44
This should be implemented
benwells
2014/08/14 04:42:50
Done.
| |
| 269 } | |
| 270 | |
| 267 /////////////////////////////////////////////////////////////////////////////// | 271 /////////////////////////////////////////////////////////////////////////////// |
| 268 // gfx::AnimationDelegate overrides: | 272 // gfx::AnimationDelegate overrides: |
| 269 | 273 |
| 270 void BrowserHeaderPainterAsh::AnimationProgressed( | 274 void BrowserHeaderPainterAsh::AnimationProgressed( |
| 271 const gfx::Animation* animation) { | 275 const gfx::Animation* animation) { |
| 272 view_->SchedulePaintInRect(GetPaintedBounds()); | 276 view_->SchedulePaintInRect(GetPaintedBounds()); |
| 273 } | 277 } |
| 274 | 278 |
| 275 /////////////////////////////////////////////////////////////////////////////// | 279 /////////////////////////////////////////////////////////////////////////////// |
| 276 // BrowserHeaderPainterAsh, private: | 280 // BrowserHeaderPainterAsh, private: |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 428 } | 432 } |
| 429 | 433 |
| 430 gfx::Rect BrowserHeaderPainterAsh::GetPaintedBounds() const { | 434 gfx::Rect BrowserHeaderPainterAsh::GetPaintedBounds() const { |
| 431 return gfx::Rect(view_->width(), painted_height_); | 435 return gfx::Rect(view_->width(), painted_height_); |
| 432 } | 436 } |
| 433 | 437 |
| 434 gfx::Rect BrowserHeaderPainterAsh::GetTitleBounds() const { | 438 gfx::Rect BrowserHeaderPainterAsh::GetTitleBounds() const { |
| 435 return ash::HeaderPainterUtil::GetTitleBounds(window_icon_, | 439 return ash::HeaderPainterUtil::GetTitleBounds(window_icon_, |
| 436 caption_button_container_, BrowserFrame::GetTitleFontList()); | 440 caption_button_container_, BrowserFrame::GetTitleFontList()); |
| 437 } | 441 } |
| OLD | NEW |