| 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 "ash/shell.h" | 5 #include "ash/shell.h" |
| 6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 7 #include "ui/aura/window.h" | 7 #include "ui/aura/window.h" |
| 8 #include "ui/aura/window_event_dispatcher.h" | 8 #include "ui/aura/window_event_dispatcher.h" |
| 9 #include "ui/gfx/canvas.h" | 9 #include "ui/gfx/canvas.h" |
| 10 #include "ui/views/controls/button/checkbox.h" | 10 #include "ui/views/controls/button/checkbox.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 views::Checkbox* checkbox_checked_; | 47 views::Checkbox* checkbox_checked_; |
| 48 views::Checkbox* checkbox_checked_disabled_; | 48 views::Checkbox* checkbox_checked_disabled_; |
| 49 views::RadioButton* radio_button_; | 49 views::RadioButton* radio_button_; |
| 50 views::RadioButton* radio_button_disabled_; | 50 views::RadioButton* radio_button_disabled_; |
| 51 views::RadioButton* radio_button_selected_; | 51 views::RadioButton* radio_button_selected_; |
| 52 views::RadioButton* radio_button_selected_disabled_; | 52 views::RadioButton* radio_button_selected_disabled_; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 WidgetsWindow::WidgetsWindow() | 55 WidgetsWindow::WidgetsWindow() |
| 56 : button_( | 56 : button_( |
| 57 views::MdTextButton::CreateMdButton(nullptr, | 57 views::MdTextButton::Create(nullptr, base::ASCIIToUTF16("Button"))), |
| 58 base::ASCIIToUTF16("Button"))), | 58 disabled_button_( |
| 59 disabled_button_(views::MdTextButton::CreateMdButton( | 59 views::MdTextButton::Create(nullptr, |
| 60 nullptr, | 60 base::ASCIIToUTF16("Disabled button"))), |
| 61 base::ASCIIToUTF16("Disabled button"))), | |
| 62 checkbox_(new views::Checkbox(base::ASCIIToUTF16("Checkbox"))), | 61 checkbox_(new views::Checkbox(base::ASCIIToUTF16("Checkbox"))), |
| 63 checkbox_disabled_( | 62 checkbox_disabled_( |
| 64 new views::Checkbox(base::ASCIIToUTF16("Checkbox disabled"))), | 63 new views::Checkbox(base::ASCIIToUTF16("Checkbox disabled"))), |
| 65 checkbox_checked_( | 64 checkbox_checked_( |
| 66 new views::Checkbox(base::ASCIIToUTF16("Checkbox checked"))), | 65 new views::Checkbox(base::ASCIIToUTF16("Checkbox checked"))), |
| 67 checkbox_checked_disabled_( | 66 checkbox_checked_disabled_( |
| 68 new views::Checkbox(base::ASCIIToUTF16("Checkbox checked disabled"))), | 67 new views::Checkbox(base::ASCIIToUTF16("Checkbox checked disabled"))), |
| 69 radio_button_( | 68 radio_button_( |
| 70 new views::RadioButton(base::ASCIIToUTF16("Radio button"), 0)), | 69 new views::RadioButton(base::ASCIIToUTF16("Radio button"), 0)), |
| 71 radio_button_disabled_( | 70 radio_button_disabled_( |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 void CreateWidgetsWindow() { | 139 void CreateWidgetsWindow() { |
| 141 gfx::Rect bounds(kWindowLeft, kWindowTop, kWindowWidth, kWindowHeight); | 140 gfx::Rect bounds(kWindowLeft, kWindowTop, kWindowWidth, kWindowHeight); |
| 142 views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds( | 141 views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds( |
| 143 new WidgetsWindow, Shell::GetPrimaryRootWindow(), bounds); | 142 new WidgetsWindow, Shell::GetPrimaryRootWindow(), bounds); |
| 144 widget->GetNativeView()->SetName("WidgetsWindow"); | 143 widget->GetNativeView()->SetName("WidgetsWindow"); |
| 145 widget->Show(); | 144 widget->Show(); |
| 146 } | 145 } |
| 147 | 146 |
| 148 } // namespace shell | 147 } // namespace shell |
| 149 } // namespace ash | 148 } // namespace ash |
| OLD | NEW |