Chromium Code Reviews| Index: ash/wm/partial_screenshot_view.cc |
| diff --git a/ash/wm/partial_screenshot_view.cc b/ash/wm/partial_screenshot_view.cc |
| index 8068971da18a412860528b0c23e3b693a91f07c2..617119b596390885e71c02df7dffcf578bb1830e 100644 |
| --- a/ash/wm/partial_screenshot_view.cc |
| +++ b/ash/wm/partial_screenshot_view.cc |
| @@ -7,7 +7,7 @@ |
| #include "ash/screenshot_delegate.h" |
| #include "ash/shell.h" |
| #include "ash/shell_window_ids.h" |
| -#include "ash/wm/partial_screenshot_event_filter.h" |
| +#include "ash/wm/overlay_event_filter.h" |
| #include "ui/aura/root_window.h" |
| #include "ui/base/cursor/cursor.h" |
| #include "ui/gfx/canvas.h" |
| @@ -54,20 +54,28 @@ void PartialScreenshotView::StartPartialScreenshot( |
| // events. This will close the context menu. |
| widget->GetNativeView()->SetCapture(); |
| - Shell::GetInstance()->partial_screenshot_filter()->Activate(view); |
| + Shell::GetInstance()->overlay_filter()->Activate(view); |
| +} |
| + |
| +gfx::NativeCursor PartialScreenshotView::GetCursor( |
| + const views::MouseEvent& event) { |
| + // Always use "crosshair" cursor. |
| + return ui::kCursorCross; |
| } |
| void PartialScreenshotView::Cancel() { |
| - Shell::GetInstance()->partial_screenshot_filter()->Deactivate(); |
| + Shell::GetInstance()->overlay_filter()->Deactivate(); |
| views::Widget* widget = GetWidget(); |
| if (widget) |
| widget->Close(); |
| } |
| -gfx::NativeCursor PartialScreenshotView::GetCursor( |
| - const views::MouseEvent& event) { |
| - // Always use "crosshair" cursor. |
| - return ui::kCursorCross; |
| +bool PartialScreenshotView::IsCancelingKeyEvent(aura::KeyEvent* event) { |
| + return (event->key_code() == ui::VKEY_ESCAPE); |
|
Jun Mukai
2012/07/26 01:19:26
outer paren is not necessary
mazda
2012/07/26 02:09:08
Done.
|
| +} |
| + |
| +aura::Window* PartialScreenshotView::GetWindow() { |
| + return GetWidget()->GetNativeWindow(); |
| } |
| void PartialScreenshotView::OnPaint(gfx::Canvas* canvas) { |