OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/frame/bubble_frame_view.h" | 5 #include "chrome/browser/chromeos/frame/bubble_frame_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/chromeos/frame/bubble_window.h" | 10 #include "chrome/browser/chromeos/frame/bubble_window.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 #else | 37 #else |
38 const int kTitleFontSizeDelta = 1; | 38 const int kTitleFontSizeDelta = 1; |
39 #endif | 39 #endif |
40 | 40 |
41 } // namespace | 41 } // namespace |
42 | 42 |
43 namespace chromeos { | 43 namespace chromeos { |
44 | 44 |
45 BubbleFrameView::BubbleFrameView(views::Widget* frame, | 45 BubbleFrameView::BubbleFrameView(views::Widget* frame, |
46 views::WidgetDelegate* widget_delegate, | 46 views::WidgetDelegate* widget_delegate, |
47 BubbleWindowStyle style) | 47 DialogStyle style) |
48 : frame_(frame), | 48 : frame_(frame), |
49 style_(style), | 49 style_(style), |
50 title_(NULL), | 50 title_(NULL), |
51 close_button_(NULL), | 51 close_button_(NULL), |
52 throbber_(NULL) { | 52 throbber_(NULL) { |
53 if (widget_delegate->ShouldShowWindowTitle()) { | 53 if (widget_delegate->ShouldShowWindowTitle()) { |
54 title_ = new views::Label(widget_delegate->GetWindowTitle()); | 54 title_ = new views::Label(widget_delegate->GetWindowTitle()); |
55 title_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 55 title_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
56 title_->SetFont(title_->font().DeriveFont(kFontSizeCorrectionDelta, | 56 title_->SetFont(title_->font().DeriveFont(kFontSizeCorrectionDelta, |
57 gfx::Font::BOLD)); | 57 gfx::Font::BOLD)); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 canvas->GetSkCanvas()->drawPath(path, paint); | 217 canvas->GetSkCanvas()->drawPath(path, paint); |
218 } | 218 } |
219 | 219 |
220 void BubbleFrameView::ButtonPressed(views::Button* sender, | 220 void BubbleFrameView::ButtonPressed(views::Button* sender, |
221 const views::Event& event) { | 221 const views::Event& event) { |
222 if (close_button_ != NULL && sender == close_button_) | 222 if (close_button_ != NULL && sender == close_button_) |
223 frame_->Close(); | 223 frame_->Close(); |
224 } | 224 } |
225 | 225 |
226 } // namespace chromeos | 226 } // namespace chromeos |
OLD | NEW |