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 "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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 #endif | 258 #endif |
259 } | 259 } |
260 | 260 |
261 WindowTypeLauncher::~WindowTypeLauncher() { | 261 WindowTypeLauncher::~WindowTypeLauncher() { |
262 } | 262 } |
263 | 263 |
264 void WindowTypeLauncher::OnPaint(gfx::Canvas* canvas) { | 264 void WindowTypeLauncher::OnPaint(gfx::Canvas* canvas) { |
265 canvas->FillRect(GetLocalBounds(), SK_ColorWHITE); | 265 canvas->FillRect(GetLocalBounds(), SK_ColorWHITE); |
266 } | 266 } |
267 | 267 |
268 bool WindowTypeLauncher::OnMousePressed(const views::MouseEvent& event) { | 268 bool WindowTypeLauncher::OnMousePressed(const ui::MouseEvent& event) { |
269 // Overridden so we get OnMouseReleased and can show the context menu. | 269 // Overridden so we get OnMouseReleased and can show the context menu. |
270 return true; | 270 return true; |
271 } | 271 } |
272 | 272 |
273 views::View* WindowTypeLauncher::GetContentsView() { | 273 views::View* WindowTypeLauncher::GetContentsView() { |
274 return this; | 274 return this; |
275 } | 275 } |
276 | 276 |
277 bool WindowTypeLauncher::CanResize() const { | 277 bool WindowTypeLauncher::CanResize() const { |
278 return true; | 278 return true; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |