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

Side by Side Diff: apps/ui/native_app_window.h

Issue 297123002: API proposal for chrome.app.window to intercept all keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comments to explain logic behind posting instead of directly handling keyboard events. Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef APPS_UI_NATIVE_APP_WINDOW_H_ 5 #ifndef APPS_UI_NATIVE_APP_WINDOW_H_
6 #define APPS_UI_NATIVE_APP_WINDOW_H_ 6 #define APPS_UI_NATIVE_APP_WINDOW_H_
7 7
8 #include "apps/app_window.h" 8 #include "apps/app_window.h"
9 #include "components/web_modal/web_contents_modal_dialog_host.h" 9 #include "components/web_modal/web_contents_modal_dialog_host.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 virtual void UpdateDraggableRegions( 42 virtual void UpdateDraggableRegions(
43 const std::vector<extensions::DraggableRegion>& regions) = 0; 43 const std::vector<extensions::DraggableRegion>& regions) = 0;
44 44
45 // Returns the region used by frameless windows for dragging. May return NULL. 45 // Returns the region used by frameless windows for dragging. May return NULL.
46 virtual SkRegion* GetDraggableRegion() = 0; 46 virtual SkRegion* GetDraggableRegion() = 0;
47 47
48 // Called when the window shape is changed. If |region| is NULL then the 48 // Called when the window shape is changed. If |region| is NULL then the
49 // window is restored to the default shape. 49 // window is restored to the default shape.
50 virtual void UpdateShape(scoped_ptr<SkRegion> region) = 0; 50 virtual void UpdateShape(scoped_ptr<SkRegion> region) = 0;
51 51
52 // Set whether the window should receive all keyboard events including task
53 // switching keys.
54 virtual void SetInterceptAllKeys(bool want_all_keys) = 0;
55
52 // Allows the window to handle unhandled keyboard messages coming back from 56 // Allows the window to handle unhandled keyboard messages coming back from
53 // the renderer. 57 // the renderer.
54 virtual void HandleKeyboardEvent( 58 virtual void HandleKeyboardEvent(
55 const content::NativeWebKeyboardEvent& event) = 0; 59 const content::NativeWebKeyboardEvent& event) = 0;
56 60
57 // Returns true if the window has no frame, as for a window opened by 61 // Returns true if the window has no frame, as for a window opened by
58 // chrome.app.window.create with the option 'frame' set to 'none'. 62 // chrome.app.window.create with the option 'frame' set to 'none'.
59 virtual bool IsFrameless() const = 0; 63 virtual bool IsFrameless() const = 0;
60 64
61 // Returns information about the window's frame. 65 // Returns information about the window's frame.
(...skipping 28 matching lines...) Expand all
90 // Returns false if the underlying native window ignores alpha transparency 94 // Returns false if the underlying native window ignores alpha transparency
91 // when compositing. 95 // when compositing.
92 virtual bool CanHaveAlphaEnabled() const = 0; 96 virtual bool CanHaveAlphaEnabled() const = 0;
93 97
94 virtual ~NativeAppWindow() {} 98 virtual ~NativeAppWindow() {}
95 }; 99 };
96 100
97 } // namespace apps 101 } // namespace apps
98 102
99 #endif // APPS_UI_NATIVE_APP_WINDOW_H_ 103 #endif // APPS_UI_NATIVE_APP_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698