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

Unified Diff: ash/wm/partial_screenshot_view.cc

Issue 10825026: Make accelerators not to work when the keyboard overlay is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698