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/browser_non_client_frame_view_ash.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" | 8 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" |
9 #include "ash/wm/frame_painter.h" | 9 #include "ash/wm/frame_painter.h" |
10 #include "chrome/browser/themes/theme_properties.h" | 10 #include "chrome/browser/themes/theme_properties.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 : BrowserNonClientFrameView(frame, browser_view), | 83 : BrowserNonClientFrameView(frame, browser_view), |
84 caption_button_container_(NULL), | 84 caption_button_container_(NULL), |
85 window_icon_(NULL), | 85 window_icon_(NULL), |
86 frame_painter_(new ash::FramePainter) { | 86 frame_painter_(new ash::FramePainter) { |
87 } | 87 } |
88 | 88 |
89 BrowserNonClientFrameViewAsh::~BrowserNonClientFrameViewAsh() { | 89 BrowserNonClientFrameViewAsh::~BrowserNonClientFrameViewAsh() { |
90 } | 90 } |
91 | 91 |
92 void BrowserNonClientFrameViewAsh::Init() { | 92 void BrowserNonClientFrameViewAsh::Init() { |
93 caption_button_container_ = new ash::FrameCaptionButtonContainerView(this, | 93 caption_button_container_ = new ash::FrameCaptionButtonContainerView(frame(), |
94 frame(), ash::FrameCaptionButtonContainerView::MINIMIZE_ALLOWED); | 94 ash::FrameCaptionButtonContainerView::MINIMIZE_ALLOWED); |
95 AddChildView(caption_button_container_); | 95 AddChildView(caption_button_container_); |
96 | 96 |
97 // Initializing the TabIconView is expensive, so only do it if we need to. | 97 // Initializing the TabIconView is expensive, so only do it if we need to. |
98 if (browser_view()->ShouldShowWindowIcon()) { | 98 if (browser_view()->ShouldShowWindowIcon()) { |
99 window_icon_ = new TabIconView(this); | 99 window_icon_ = new TabIconView(this); |
100 window_icon_->set_is_light(true); | 100 window_icon_->set_is_light(true); |
101 AddChildView(window_icon_); | 101 AddChildView(window_icon_); |
102 window_icon_->Update(); | 102 window_icon_->Update(); |
103 } | 103 } |
104 | 104 |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 int BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImageId() const { | 552 int BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImageId() const { |
553 ui::ThemeProvider* tp = GetThemeProvider(); | 553 ui::ThemeProvider* tp = GetThemeProvider(); |
554 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && | 554 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && |
555 browser_view()->IsBrowserTypeNormal() && | 555 browser_view()->IsBrowserTypeNormal() && |
556 !browser_view()->IsOffTheRecord()) { | 556 !browser_view()->IsOffTheRecord()) { |
557 return ShouldPaintAsActive() ? | 557 return ShouldPaintAsActive() ? |
558 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE; | 558 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE; |
559 } | 559 } |
560 return 0; | 560 return 0; |
561 } | 561 } |
OLD | NEW |