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/app_non_client_frame_view_ash.h" | 5 #include "chrome/browser/ui/views/frame/app_non_client_frame_view_ash.h" |
6 | 6 |
7 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" | 7 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" |
8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
9 #include "chrome/browser/ui/views/frame/browser_frame.h" | 9 #include "chrome/browser/ui/views/frame/browser_frame.h" |
10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // static | 112 // static |
113 const char AppNonClientFrameViewAsh::kControlWindowName[] = | 113 const char AppNonClientFrameViewAsh::kControlWindowName[] = |
114 "AppNonClientFrameViewAshControls"; | 114 "AppNonClientFrameViewAshControls"; |
115 | 115 |
116 AppNonClientFrameViewAsh::AppNonClientFrameViewAsh( | 116 AppNonClientFrameViewAsh::AppNonClientFrameViewAsh( |
117 BrowserFrame* frame, BrowserView* browser_view) | 117 BrowserFrame* frame, BrowserView* browser_view) |
118 : BrowserNonClientFrameView(frame, browser_view), | 118 : BrowserNonClientFrameView(frame, browser_view), |
119 control_view_(NULL), | 119 control_view_(NULL), |
120 control_widget_(NULL), | 120 control_widget_(NULL), |
121 frame_observer_(new FrameObserver(this)) { | 121 frame_observer_(new FrameObserver(this)) { |
122 control_view_ = new ash::FrameCaptionButtonContainerView(this, frame, | 122 control_view_ = new ash::FrameCaptionButtonContainerView(frame, |
123 ash::FrameCaptionButtonContainerView::MINIMIZE_ALLOWED); | 123 ash::FrameCaptionButtonContainerView::MINIMIZE_ALLOWED); |
124 control_view_->set_header_style( | 124 control_view_->set_header_style( |
125 ash::FrameCaptionButtonContainerView::HEADER_STYLE_MAXIMIZED_HOSTED_APP); | 125 ash::FrameCaptionButtonContainerView::HEADER_STYLE_MAXIMIZED_HOSTED_APP); |
126 control_view_->set_border(new ControlViewBorder()); | 126 control_view_->set_border(new ControlViewBorder()); |
127 control_view_->set_background(new ControlViewBackground( | 127 control_view_->set_background(new ControlViewBackground( |
128 browser_view->IsOffTheRecord())); | 128 browser_view->IsOffTheRecord())); |
129 | 129 |
130 // This FrameView is always maximized so we don't want the window to have | 130 // This FrameView is always maximized so we don't want the window to have |
131 // resize borders. | 131 // resize borders. |
132 frame->GetNativeView()->set_hit_test_bounds_override_inner(gfx::Insets()); | 132 frame->GetNativeView()->set_hit_test_bounds_override_inner(gfx::Insets()); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 base::i18n::IsRTL() ? 0 : (width() - preferred.width()), 0, | 227 base::i18n::IsRTL() ? 0 : (width() - preferred.width()), 0, |
228 preferred.width(), preferred.height()); | 228 preferred.width(), preferred.height()); |
229 } | 229 } |
230 | 230 |
231 void AppNonClientFrameViewAsh::CloseControlWidget() { | 231 void AppNonClientFrameViewAsh::CloseControlWidget() { |
232 if (control_widget_) { | 232 if (control_widget_) { |
233 control_widget_->Close(); | 233 control_widget_->Close(); |
234 control_widget_ = NULL; | 234 control_widget_ = NULL; |
235 } | 235 } |
236 } | 236 } |
OLD | NEW |