| 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/window_type_launcher.h" | 5 #include "ash/shell/window_type_launcher.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/public/cpp/shell_window_ids.h" | 9 #include "ash/public/cpp/shell_window_ids.h" |
| 10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 examples_button_(MdTextButton::Create( | 199 examples_button_(MdTextButton::Create( |
| 200 this, | 200 this, |
| 201 base::ASCIIToUTF16("Open Views Examples Window"))), | 201 base::ASCIIToUTF16("Open Views Examples Window"))), |
| 202 show_hide_window_button_( | 202 show_hide_window_button_( |
| 203 MdTextButton::Create(this, base::ASCIIToUTF16("Show/Hide a Window"))), | 203 MdTextButton::Create(this, base::ASCIIToUTF16("Show/Hide a Window"))), |
| 204 show_web_notification_(MdTextButton::Create( | 204 show_web_notification_(MdTextButton::Create( |
| 205 this, | 205 this, |
| 206 base::ASCIIToUTF16("Show a web/app notification"))), | 206 base::ASCIIToUTF16("Show a web/app notification"))), |
| 207 show_views_examples_callback_(show_views_examples_callback) { | 207 show_views_examples_callback_(show_views_examples_callback) { |
| 208 views::GridLayout* layout = new views::GridLayout(this); | 208 views::GridLayout* layout = new views::GridLayout(this); |
| 209 layout->SetInsets(5, 5, 5, 5); | |
| 210 SetLayoutManager(layout); | 209 SetLayoutManager(layout); |
| 210 SetBorder(CreateEmptyBorder(gfx::Insets(5))); |
| 211 views::ColumnSet* column_set = layout->AddColumnSet(0); | 211 views::ColumnSet* column_set = layout->AddColumnSet(0); |
| 212 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER, | 212 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER, |
| 213 0, views::GridLayout::USE_PREF, 0, 0); | 213 0, views::GridLayout::USE_PREF, 0, 0); |
| 214 AddViewToLayout(layout, create_button_); | 214 AddViewToLayout(layout, create_button_); |
| 215 AddViewToLayout(layout, panel_button_); | 215 AddViewToLayout(layout, panel_button_); |
| 216 AddViewToLayout(layout, create_nonresizable_button_); | 216 AddViewToLayout(layout, create_nonresizable_button_); |
| 217 AddViewToLayout(layout, bubble_button_); | 217 AddViewToLayout(layout, bubble_button_); |
| 218 AddViewToLayout(layout, lock_button_); | 218 AddViewToLayout(layout, lock_button_); |
| 219 AddViewToLayout(layout, widgets_button_); | 219 AddViewToLayout(layout, widgets_button_); |
| 220 AddViewToLayout(layout, system_modal_button_); | 220 AddViewToLayout(layout, system_modal_button_); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 MenuItemView::NORMAL); | 329 MenuItemView::NORMAL); |
| 330 // MenuRunner takes ownership of root. | 330 // MenuRunner takes ownership of root. |
| 331 menu_runner_.reset(new MenuRunner( | 331 menu_runner_.reset(new MenuRunner( |
| 332 root, MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU)); | 332 root, MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU)); |
| 333 menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 333 menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
| 334 views::MENU_ANCHOR_TOPLEFT, source_type); | 334 views::MENU_ANCHOR_TOPLEFT, source_type); |
| 335 } | 335 } |
| 336 | 336 |
| 337 } // namespace shell | 337 } // namespace shell |
| 338 } // namespace ash | 338 } // namespace ash |
| OLD | NEW |