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

Unified Diff: ash/wm/partial_screenshot_view.h

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
« no previous file with comments | « ash/wm/partial_screenshot_event_filter.cc ('k') | ash/wm/partial_screenshot_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/partial_screenshot_view.h
diff --git a/ash/wm/partial_screenshot_view.h b/ash/wm/partial_screenshot_view.h
index 4cf959e0733a64e0bfeaee4de53d0414ba9d7088..b431e275781f9996b1b17cd6c989da69ee3161e1 100644
--- a/ash/wm/partial_screenshot_view.h
+++ b/ash/wm/partial_screenshot_view.h
@@ -6,6 +6,7 @@
#define ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_
#include "ash/ash_export.h"
+#include "ash/wm/overlay_event_filter.h"
#include "base/compiler_specific.h"
#include "ui/gfx/point.h"
#include "ui/views/widget/widget_delegate.h"
@@ -16,7 +17,9 @@ class ScreenshotDelegate;
// The view of taking partial screenshot, i.e.: drawing region
// rectangles during drag, and changing the mouse cursor to indicate
// the current mode.
-class ASH_EXPORT PartialScreenshotView : public views::WidgetDelegateView {
+class ASH_EXPORT PartialScreenshotView
+ : public views::WidgetDelegateView,
+ public internal::OverlayEventFilter::Delegate {
public:
PartialScreenshotView(ScreenshotDelegate* screenshot_delegate);
virtual ~PartialScreenshotView();
@@ -24,12 +27,14 @@ class ASH_EXPORT PartialScreenshotView : public views::WidgetDelegateView {
// Starts the UI for taking partial screenshot; dragging to select a region.
static void StartPartialScreenshot(ScreenshotDelegate* screenshot_delegate);
- // Cancels the current screenshot UI.
- void Cancel();
-
// Overriddden from View:
virtual gfx::NativeCursor GetCursor(const views::MouseEvent& event) OVERRIDE;
+ // Overridden from internal::OverlayEventFilter::Delegate:
+ virtual void Cancel() OVERRIDE;
+ virtual bool IsCancelingKeyEvent(aura::KeyEvent* event) OVERRIDE;
+ virtual aura::Window* GetWindow() OVERRIDE;
+
private:
gfx::Rect GetScreenshotRect() const;
« no previous file with comments | « ash/wm/partial_screenshot_event_filter.cc ('k') | ash/wm/partial_screenshot_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698