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

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: Sync to TOT Created 6 years 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 const std::vector<extensions::DraggableRegion>& regions) override; 130 const std::vector<extensions::DraggableRegion>& regions) override;
131 SkRegion* GetDraggableRegion() override; 131 SkRegion* GetDraggableRegion() override;
132 void HandleKeyboardEvent( 132 void HandleKeyboardEvent(
133 const content::NativeWebKeyboardEvent& event) override; 133 const content::NativeWebKeyboardEvent& event) override;
134 bool IsFrameless() const override; 134 bool IsFrameless() const override;
135 bool HasFrameColor() const override; 135 bool HasFrameColor() const override;
136 SkColor ActiveFrameColor() const override; 136 SkColor ActiveFrameColor() const override;
137 SkColor InactiveFrameColor() const override; 137 SkColor InactiveFrameColor() const override;
138 gfx::Insets GetFrameInsets() const override; 138 gfx::Insets GetFrameInsets() const override;
139 bool CanHaveAlphaEnabled() const override; 139 bool CanHaveAlphaEnabled() const override;
140 virtual void SetInterceptAllKeys(bool want_all_keys) override;
140 141
141 // These are used to simulate Mac-style hide/show. Since windows can be hidden 142 // These are used to simulate Mac-style hide/show. Since windows can be hidden
142 // and shown using the app.window API, this sets is_hidden_with_app_ to 143 // and shown using the app.window API, this sets is_hidden_with_app_ to
143 // differentiate the reason a window was hidden. 144 // differentiate the reason a window was hidden.
144 void ShowWithApp() override; 145 void ShowWithApp() override;
145 void HideWithApp() override; 146 void HideWithApp() override;
146 void UpdateShelfMenu() override; 147 void UpdateShelfMenu() override;
147 gfx::Size GetContentMinimumSize() const override; 148 gfx::Size GetContentMinimumSize() const override;
148 gfx::Size GetContentMaximumSize() const override; 149 gfx::Size GetContentMaximumSize() const override;
149 void SetContentSizeConstraints(const gfx::Size& min_size, 150 void SetContentSizeConstraints(const gfx::Size& min_size,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 std::vector<extensions::DraggableRegion> draggable_regions_; 212 std::vector<extensions::DraggableRegion> draggable_regions_;
212 213
213 // The Extension Command Registry used to determine which keyboard events to 214 // The Extension Command Registry used to determine which keyboard events to
214 // handle. 215 // handle.
215 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; 216 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_;
216 217
217 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoa); 218 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoa);
218 }; 219 };
219 220
220 #endif // CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_ 221 #endif // CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_window_intercept_all_keys_uitest.cc ('k') | chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698