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

Unified Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views_mac.h

Issue 975043003: [MacViews] Add NativeAppWindowViewsMac and port HideWithApp behavior from NativeAppWindowCocoa. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@views
Patch Set: Change gypi variable name. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/apps/chrome_native_app_window_views_mac.h
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views_mac.h b/chrome/browser/ui/views/apps/chrome_native_app_window_views_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..96cc3016b04d7eca5e1c87764c1d87e835d5062c
--- /dev/null
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views_mac.h
@@ -0,0 +1,36 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_MAC_H_
+#define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_MAC_H_
+
+#include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
+
+// Mac-specific parts of ChromeNativeAppWindowViews.
+class ChromeNativeAppWindowViewsMac : public ChromeNativeAppWindowViews {
+ public:
+ ChromeNativeAppWindowViewsMac();
+ ~ChromeNativeAppWindowViewsMac() override;
+
+ protected:
+ // ui::BaseWindow implementation.
+ void Show() override;
+ void ShowInactive() override;
+
+ // NativeAppWindow implementation.
+ // These are used to simulate Mac-style hide/show. Since windows can be hidden
+ // and shown using the app.window API, this sets is_hidden_with_app_ to
+ // differentiate the reason a window was hidden.
+ void ShowWithApp() override;
+ void HideWithApp() override;
+
+ private:
+ // Whether this window last became hidden due to a request to hide the entire
+ // app, e.g. via the dock menu or Cmd+H. This is set by Hide/ShowWithApp.
+ bool is_hidden_with_app_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsMac);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698