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

Side by Side Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views.h

Issue 1316013004: Remove "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 5 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "extensions/components/native_app_window/native_app_window_views.h" 9 #include "extensions/components/native_app_window/native_app_window_views.h"
10 10
11 namespace apps { 11 namespace apps {
12 class AppWindowFrameView; 12 class AppWindowFrameView;
13 } 13 }
14 14
15 class DesktopKeyboardCapture;
16 class ExtensionKeybindingRegistryViews; 15 class ExtensionKeybindingRegistryViews;
17 16
18 class ChromeNativeAppWindowViews 17 class ChromeNativeAppWindowViews
19 : public native_app_window::NativeAppWindowViews { 18 : public native_app_window::NativeAppWindowViews {
20 public: 19 public:
21 ChromeNativeAppWindowViews(); 20 ChromeNativeAppWindowViews();
22 ~ChromeNativeAppWindowViews() override; 21 ~ChromeNativeAppWindowViews() override;
23 22
24 SkRegion* shape() { return shape_.get(); } 23 SkRegion* shape() { return shape_.get(); }
25 24
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 gfx::Size GetPreferredSize() const override; 59 gfx::Size GetPreferredSize() const override;
61 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; 60 bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
62 61
63 // NativeAppWindow implementation. 62 // NativeAppWindow implementation.
64 void SetFullscreen(int fullscreen_types) override; 63 void SetFullscreen(int fullscreen_types) override;
65 bool IsFullscreenOrPending() const override; 64 bool IsFullscreenOrPending() const override;
66 void UpdateShape(scoped_ptr<SkRegion> region) override; 65 void UpdateShape(scoped_ptr<SkRegion> region) override;
67 bool HasFrameColor() const override; 66 bool HasFrameColor() const override;
68 SkColor ActiveFrameColor() const override; 67 SkColor ActiveFrameColor() const override;
69 SkColor InactiveFrameColor() const override; 68 SkColor InactiveFrameColor() const override;
70 void SetInterceptAllKeys(bool want_all_keys) override;
71 69
72 // NativeAppWindowViews implementation. 70 // NativeAppWindowViews implementation.
73 void InitializeWindow( 71 void InitializeWindow(
74 extensions::AppWindow* app_window, 72 extensions::AppWindow* app_window,
75 const extensions::AppWindow::CreateParams& create_params) override; 73 const extensions::AppWindow::CreateParams& create_params) override;
76 74
77 private: 75 private:
78 // Custom shape of the window. If this is not set then the window has a 76 // Custom shape of the window. If this is not set then the window has a
79 // default shape, usually rectangular. 77 // default shape, usually rectangular.
80 scoped_ptr<SkRegion> shape_; 78 scoped_ptr<SkRegion> shape_;
81 79
82 bool has_frame_color_; 80 bool has_frame_color_;
83 SkColor active_frame_color_; 81 SkColor active_frame_color_;
84 SkColor inactive_frame_color_; 82 SkColor inactive_frame_color_;
85 gfx::Size preferred_size_; 83 gfx::Size preferred_size_;
86 84
87 // The class that registers for keyboard shortcuts for extension commands. 85 // The class that registers for keyboard shortcuts for extension commands.
88 scoped_ptr<ExtensionKeybindingRegistryViews> extension_keybinding_registry_; 86 scoped_ptr<ExtensionKeybindingRegistryViews> extension_keybinding_registry_;
89 87
90 // Used to capture all keyboard events including task switching sequence.
91 scoped_ptr<DesktopKeyboardCapture> desktop_keyboard_capture_;
92
93 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViews); 88 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViews);
94 }; 89 };
95 90
96 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ 91 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698