Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: ash/shell/window_type_launcher.cc

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/shell/window_type_launcher.h ('k') | ash/system/audio/tray_volume.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ash/screensaver/screensaver_view.h" 7 #include "ash/screensaver/screensaver_view.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell/example_factory.h" 9 #include "ash/shell/example_factory.h"
10 #include "ash/shell/panel_window.h" 10 #include "ash/shell/panel_window.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 virtual string16 GetWindowTitle() const OVERRIDE { 90 virtual string16 GetWindowTitle() const OVERRIDE {
91 return ASCIIToUTF16("Modal Window"); 91 return ASCIIToUTF16("Modal Window");
92 } 92 }
93 virtual ui::ModalType GetModalType() const OVERRIDE { 93 virtual ui::ModalType GetModalType() const OVERRIDE {
94 return modal_type_; 94 return modal_type_;
95 } 95 }
96 96
97 // Overridden from views::ButtonListener: 97 // Overridden from views::ButtonListener:
98 virtual void ButtonPressed(views::Button* sender, 98 virtual void ButtonPressed(views::Button* sender,
99 const views::Event& event) OVERRIDE { 99 const ui::Event& event) OVERRIDE {
100 DCHECK(sender == open_button_); 100 DCHECK(sender == open_button_);
101 OpenModalWindow(GetWidget()->GetNativeView(), modal_type_); 101 OpenModalWindow(GetWidget()->GetNativeView(), modal_type_);
102 } 102 }
103 103
104 private: 104 private:
105 ui::ModalType modal_type_; 105 ui::ModalType modal_type_;
106 SkColor color_; 106 SkColor color_;
107 views::NativeTextButton* open_button_; 107 views::NativeTextButton* open_button_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(ModalWindow); 109 DISALLOW_COPY_AND_ASSIGN(ModalWindow);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 string16 WindowTypeLauncher::GetWindowTitle() const { 281 string16 WindowTypeLauncher::GetWindowTitle() const {
282 return ASCIIToUTF16("Examples: Window Builder"); 282 return ASCIIToUTF16("Examples: Window Builder");
283 } 283 }
284 284
285 bool WindowTypeLauncher::CanMaximize() const { 285 bool WindowTypeLauncher::CanMaximize() const {
286 return true; 286 return true;
287 } 287 }
288 288
289 void WindowTypeLauncher::ButtonPressed(views::Button* sender, 289 void WindowTypeLauncher::ButtonPressed(views::Button* sender,
290 const views::Event& event) { 290 const ui::Event& event) {
291 if (sender == create_button_) { 291 if (sender == create_button_) {
292 ToplevelWindow::CreateParams params; 292 ToplevelWindow::CreateParams params;
293 params.can_resize = true; 293 params.can_resize = true;
294 params.can_maximize = true; 294 params.can_maximize = true;
295 ToplevelWindow::CreateToplevelWindow(params); 295 ToplevelWindow::CreateToplevelWindow(params);
296 } else if (sender == create_persistant_button_) { 296 } else if (sender == create_persistant_button_) {
297 ToplevelWindow::CreateParams params; 297 ToplevelWindow::CreateParams params;
298 params.can_resize = true; 298 params.can_resize = true;
299 params.can_maximize = true; 299 params.can_maximize = true;
300 params.persist_across_all_workspaces = true; 300 params.persist_across_all_workspaces = true;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 menu_runner_.reset(new MenuRunner(root)); 373 menu_runner_.reset(new MenuRunner(root));
374 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), 374 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()),
375 MenuItemView::TOPLEFT, 375 MenuItemView::TOPLEFT,
376 MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED) 376 MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED)
377 return; 377 return;
378 } 378 }
379 #endif // !defined(OS_MACOSX) 379 #endif // !defined(OS_MACOSX)
380 380
381 } // namespace shell 381 } // namespace shell
382 } // namespace ash 382 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/window_type_launcher.h ('k') | ash/system/audio/tray_volume.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698