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

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: Fix permission check in code after rename Created 6 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 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 messages from the
53 virtual void SetInterceptAllKeys(bool want_all_keys) = 0;
54
52 // Allows the window to handle unhandled keyboard messages coming back from 55 // Allows the window to handle unhandled keyboard messages coming back from
53 // the renderer. 56 // the renderer.
54 virtual void HandleKeyboardEvent( 57 virtual void HandleKeyboardEvent(
55 const content::NativeWebKeyboardEvent& event) = 0; 58 const content::NativeWebKeyboardEvent& event) = 0;
56 59
57 // Returns true if the window has no frame, as for a window opened by 60 // 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'. 61 // chrome.app.window.create with the option 'frame' set to 'none'.
59 virtual bool IsFrameless() const = 0; 62 virtual bool IsFrameless() const = 0;
60 63
61 // Returns information about the window's frame. 64 // Returns information about the window's frame.
(...skipping 24 matching lines...) Expand all
86 // Updates the minimum and maximum size constraints of the content. 89 // Updates the minimum and maximum size constraints of the content.
87 virtual void SetContentSizeConstraints(const gfx::Size& min_size, 90 virtual void SetContentSizeConstraints(const gfx::Size& min_size,
88 const gfx::Size& max_size) = 0; 91 const gfx::Size& max_size) = 0;
89 92
90 virtual ~NativeAppWindow() {} 93 virtual ~NativeAppWindow() {}
91 }; 94 };
92 95
93 } // namespace apps 96 } // namespace apps
94 97
95 #endif // APPS_UI_NATIVE_APP_WINDOW_H_ 98 #endif // APPS_UI_NATIVE_APP_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698