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

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

Issue 1023083002: [MacViews] Implement size constraints for app windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update ui/gfx/BUILD.gn Created 5 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_MAC_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_MAC_H_
6 #define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_MAC_H_ 6 #define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_MAC_H_
7 7
8 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h" 8 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
9 9
10 // Mac-specific parts of ChromeNativeAppWindowViews. 10 // Mac-specific parts of ChromeNativeAppWindowViews.
11 class ChromeNativeAppWindowViewsMac : public ChromeNativeAppWindowViews { 11 class ChromeNativeAppWindowViewsMac : public ChromeNativeAppWindowViews {
12 public: 12 public:
13 ChromeNativeAppWindowViewsMac(); 13 ChromeNativeAppWindowViewsMac();
14 ~ChromeNativeAppWindowViewsMac() override; 14 ~ChromeNativeAppWindowViewsMac() override;
15 15
16 protected: 16 protected:
17 // ChromeNativeAppWindowViews implementation. 17 // ChromeNativeAppWindowViews implementation.
18 void OnBeforeWidgetInit( 18 void OnBeforeWidgetInit(
19 const extensions::AppWindow::CreateParams& create_params, 19 const extensions::AppWindow::CreateParams& create_params,
20 views::Widget::InitParams* init_params, 20 views::Widget::InitParams* init_params,
21 views::Widget* widget) override; 21 views::Widget* widget) override;
22 views::NonClientFrameView* CreateStandardDesktopAppFrame() override;
22 23
23 // ui::BaseWindow implementation. 24 // ui::BaseWindow implementation.
24 void Show() override; 25 void Show() override;
25 void ShowInactive() override; 26 void ShowInactive() override;
26 27
27 // NativeAppWindow implementation. 28 // NativeAppWindow implementation.
28 // These are used to simulate Mac-style hide/show. Since windows can be hidden 29 // These are used to simulate Mac-style hide/show. Since windows can be hidden
29 // and shown using the app.window API, this sets is_hidden_with_app_ to 30 // and shown using the app.window API, this sets is_hidden_with_app_ to
30 // differentiate the reason a window was hidden. 31 // differentiate the reason a window was hidden.
31 void ShowWithApp() override; 32 void ShowWithApp() override;
32 void HideWithApp() override; 33 void HideWithApp() override;
33 34
34 private: 35 private:
35 // Whether this window last became hidden due to a request to hide the entire 36 // Whether this window last became hidden due to a request to hide the entire
36 // app, e.g. via the dock menu or Cmd+H. This is set by Hide/ShowWithApp. 37 // app, e.g. via the dock menu or Cmd+H. This is set by Hide/ShowWithApp.
37 bool is_hidden_with_app_; 38 bool is_hidden_with_app_;
38 39
39 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsMac); 40 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsMac);
40 }; 41 };
41 42
42 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_MAC_H_ 43 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698