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_panel_browser_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/app_panel_browser_frame_view.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 ALLOW_THIS_IN_INITIALIZER_LIST( | 66 ALLOW_THIS_IN_INITIALIZER_LIST( |
67 close_button_(new views::ImageButton(this))), | 67 close_button_(new views::ImageButton(this))), |
68 window_icon_(NULL) { | 68 window_icon_(NULL) { |
69 DCHECK(browser_view->ShouldShowWindowIcon()); | 69 DCHECK(browser_view->ShouldShowWindowIcon()); |
70 DCHECK(browser_view->ShouldShowWindowTitle()); | 70 DCHECK(browser_view->ShouldShowWindowTitle()); |
71 | 71 |
72 frame->set_frame_type(views::Widget::FRAME_TYPE_FORCE_CUSTOM); | 72 frame->set_frame_type(views::Widget::FRAME_TYPE_FORCE_CUSTOM); |
73 | 73 |
74 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 74 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
75 close_button_->SetImage(views::CustomButton::STATE_NORMAL, | 75 close_button_->SetImage(views::CustomButton::STATE_NORMAL, |
76 rb.GetImageSkiaNamed(IDR_CLOSE_BAR)); | 76 rb.GetImageSkiaNamed(IDR_CLOSE_2)); |
77 close_button_->SetImage(views::CustomButton::STATE_HOVERED, | 77 close_button_->SetImage(views::CustomButton::STATE_HOVERED, |
78 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H)); | 78 rb.GetImageSkiaNamed(IDR_CLOSE_2_H)); |
79 close_button_->SetImage(views::CustomButton::STATE_PRESSED, | 79 close_button_->SetImage(views::CustomButton::STATE_PRESSED, |
80 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P)); | 80 rb.GetImageSkiaNamed(IDR_CLOSE_2_P)); |
81 close_button_->SetAccessibleName( | 81 close_button_->SetAccessibleName( |
82 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); | 82 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); |
83 AddChildView(close_button_); | 83 AddChildView(close_button_); |
84 | 84 |
85 window_icon_ = new TabIconView(this); | 85 window_icon_ = new TabIconView(this); |
86 window_icon_->set_is_light(true); | 86 window_icon_->set_is_light(true); |
87 AddChildView(window_icon_); | 87 AddChildView(window_icon_); |
88 window_icon_->Update(); | 88 window_icon_->Update(); |
89 } | 89 } |
90 | 90 |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 } | 508 } |
509 | 509 |
510 gfx::Rect AppPanelBrowserFrameView::CalculateClientAreaBounds(int width, | 510 gfx::Rect AppPanelBrowserFrameView::CalculateClientAreaBounds(int width, |
511 int height) const { | 511 int height) const { |
512 int top_height = NonClientTopBorderHeight(); | 512 int top_height = NonClientTopBorderHeight(); |
513 int border_thickness = NonClientBorderThickness(); | 513 int border_thickness = NonClientBorderThickness(); |
514 return gfx::Rect(border_thickness, top_height, | 514 return gfx::Rect(border_thickness, top_height, |
515 std::max(0, width - (2 * border_thickness)), | 515 std::max(0, width - (2 * border_thickness)), |
516 std::max(0, height - top_height - border_thickness)); | 516 std::max(0, height - top_height - border_thickness)); |
517 } | 517 } |
OLD | NEW |