| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.h" | 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 } | 287 } |
| 288 | 288 |
| 289 void OpaqueBrowserFrameView::ResetWindowControls() { | 289 void OpaqueBrowserFrameView::ResetWindowControls() { |
| 290 restore_button_->SetState(views::CustomButton::STATE_NORMAL); | 290 restore_button_->SetState(views::CustomButton::STATE_NORMAL); |
| 291 minimize_button_->SetState(views::CustomButton::STATE_NORMAL); | 291 minimize_button_->SetState(views::CustomButton::STATE_NORMAL); |
| 292 maximize_button_->SetState(views::CustomButton::STATE_NORMAL); | 292 maximize_button_->SetState(views::CustomButton::STATE_NORMAL); |
| 293 // The close button isn't affected by this constraint. | 293 // The close button isn't affected by this constraint. |
| 294 } | 294 } |
| 295 | 295 |
| 296 void OpaqueBrowserFrameView::UpdateWindowIcon() { | 296 void OpaqueBrowserFrameView::UpdateWindowIcon() { |
| 297 window_icon_->SchedulePaint(); | 297 if (window_icon_) |
| 298 window_icon_->SchedulePaint(); |
| 298 } | 299 } |
| 299 | 300 |
| 300 void OpaqueBrowserFrameView::UpdateWindowTitle() { | 301 void OpaqueBrowserFrameView::UpdateWindowTitle() { |
| 301 if (!frame()->IsFullscreen()) | 302 if (!frame()->IsFullscreen()) |
| 302 window_title_->SchedulePaint(); | 303 window_title_->SchedulePaint(); |
| 303 } | 304 } |
| 304 | 305 |
| 305 void OpaqueBrowserFrameView::SizeConstraintsChanged() { | 306 void OpaqueBrowserFrameView::SizeConstraintsChanged() { |
| 306 } | 307 } |
| 307 | 308 |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 | 931 |
| 931 int OpaqueBrowserFrameView::GetTopAreaHeight() const { | 932 int OpaqueBrowserFrameView::GetTopAreaHeight() const { |
| 932 gfx::ImageSkia* frame_image = GetFrameImage(); | 933 gfx::ImageSkia* frame_image = GetFrameImage(); |
| 933 int top_area_height = frame_image->height(); | 934 int top_area_height = frame_image->height(); |
| 934 if (browser_view()->IsTabStripVisible()) { | 935 if (browser_view()->IsTabStripVisible()) { |
| 935 top_area_height = std::max(top_area_height, | 936 top_area_height = std::max(top_area_height, |
| 936 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); | 937 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); |
| 937 } | 938 } |
| 938 return top_area_height; | 939 return top_area_height; |
| 939 } | 940 } |
| OLD | NEW |