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

Side by Side Diff: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.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: Update based on sky's comments 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 CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_ 6 #define CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 const std::vector<extensions::DraggableRegion>& regions) OVERRIDE; 134 const std::vector<extensions::DraggableRegion>& regions) OVERRIDE;
135 virtual SkRegion* GetDraggableRegion() OVERRIDE; 135 virtual SkRegion* GetDraggableRegion() OVERRIDE;
136 virtual void HandleKeyboardEvent( 136 virtual void HandleKeyboardEvent(
137 const content::NativeWebKeyboardEvent& event) OVERRIDE; 137 const content::NativeWebKeyboardEvent& event) OVERRIDE;
138 virtual bool IsFrameless() const OVERRIDE; 138 virtual bool IsFrameless() const OVERRIDE;
139 virtual bool HasFrameColor() const OVERRIDE; 139 virtual bool HasFrameColor() const OVERRIDE;
140 virtual SkColor ActiveFrameColor() const OVERRIDE; 140 virtual SkColor ActiveFrameColor() const OVERRIDE;
141 virtual SkColor InactiveFrameColor() const OVERRIDE; 141 virtual SkColor InactiveFrameColor() const OVERRIDE;
142 virtual gfx::Insets GetFrameInsets() const OVERRIDE; 142 virtual gfx::Insets GetFrameInsets() const OVERRIDE;
143 virtual bool CanHaveAlphaEnabled() const OVERRIDE; 143 virtual bool CanHaveAlphaEnabled() const OVERRIDE;
144 virtual void SetInterceptAllKeys(bool want_all_keys) OVERRIDE;
144 145
145 // These are used to simulate Mac-style hide/show. Since windows can be hidden 146 // These are used to simulate Mac-style hide/show. Since windows can be hidden
146 // and shown using the app.window API, this sets is_hidden_with_app_ to 147 // and shown using the app.window API, this sets is_hidden_with_app_ to
147 // differentiate the reason a window was hidden. 148 // differentiate the reason a window was hidden.
148 virtual void ShowWithApp() OVERRIDE; 149 virtual void ShowWithApp() OVERRIDE;
149 virtual void HideWithApp() OVERRIDE; 150 virtual void HideWithApp() OVERRIDE;
150 virtual void UpdateShelfMenu() OVERRIDE; 151 virtual void UpdateShelfMenu() OVERRIDE;
151 virtual gfx::Size GetContentMinimumSize() const OVERRIDE; 152 virtual gfx::Size GetContentMinimumSize() const OVERRIDE;
152 virtual gfx::Size GetContentMaximumSize() const OVERRIDE; 153 virtual gfx::Size GetContentMaximumSize() const OVERRIDE;
153 virtual void SetContentSizeConstraints(const gfx::Size& min_size, 154 virtual void SetContentSizeConstraints(const gfx::Size& min_size,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 std::vector<extensions::DraggableRegion> draggable_regions_; 218 std::vector<extensions::DraggableRegion> draggable_regions_;
218 219
219 // The Extension Command Registry used to determine which keyboard events to 220 // The Extension Command Registry used to determine which keyboard events to
220 // handle. 221 // handle.
221 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; 222 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_;
222 223
223 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoa); 224 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoa);
224 }; 225 };
225 226
226 #endif // CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_ 227 #endif // CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698