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

Unified Diff: chrome/browser/ui/app_list/app_list_service_views_mac.h

Issue 782673002: MacViews: tryjobs for toolkit_views=1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/app_list/app_list_service_views_mac.h
diff --git a/chrome/browser/ui/app_list/app_list_service_views_mac.h b/chrome/browser/ui/app_list/app_list_service_views_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..7e6398f86b5d020ab755fffcc1c403229a9f7a13
--- /dev/null
+++ b/chrome/browser/ui/app_list/app_list_service_views_mac.h
@@ -0,0 +1,72 @@
+// 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_APP_LIST_APP_LIST_SERVICE_VIEWS_MAC_H_
+#define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_VIEWS_MAC_H_
+
+#include "chrome/browser/ui/app_list/app_list_service_mac.h"
+#include "chrome/browser/ui/app_list/app_list_service_views.h"
+#include "ui/app_list/app_list_switches.h"
+#include "ui/app_list/views/app_list_view_observer.h"
+
+class AppListServiceViewsMac;
+template <typename T>
+struct DefaultSingletonTraits;
+
+class AppListServiceViewsBridge : public AppListServiceViews,
+ public app_list::AppListViewObserver {
+ public:
+ AppListServiceViewsBridge(AppListServiceViewsMac* owner);
+
+ // AppListService overrides:
+ void DismissAppList() override;
+
+ // AppListShowerDelegate overrides:
+ void OnViewCreated() override;
+ void OnViewBeingDestroyed() override;
+ void OnViewDismissed() override;
+ void MoveNearCursor(app_list::AppListView* view) override;
+
+ // app_list::AppListViewObserver overrides:
+ void OnActivationChanged(views::Widget* widget, bool active) override;
+
+ private:
+ AppListServiceViewsMac* owner_;
+
+ DISALLOW_COPY_AND_ASSIGN(AppListServiceViewsBridge);
+};
+
+// AppListServiceViewsMac extends the Mac AppListService with a bridge for
+// showing the app list backed by toolkit-views.
+class AppListServiceViewsMac : public AppListServiceMac {
+ public:
+ ~AppListServiceViewsMac() override;
+
+ static AppListServiceViewsMac* GetInstance();
+
+ // AppListService overrides:
+ void ShowForProfile(Profile* requested_profile) override;
+ Profile* GetCurrentAppListProfile() override;
+ AppListControllerDelegate* GetControllerDelegate() override;
+
+ // AppListServiceImpl overrides:
+ void CreateForProfile(Profile* requested_profile) override;
+ void DestroyAppList() override;
+
+ protected:
+ // AppListServceMac overrides:
+ NSWindow* GetNativeWindow() const override;
+ bool ReadyToShow() override;
+
+ private:
+ friend struct DefaultSingletonTraits<AppListServiceViewsMac>;
+
+ AppListServiceViewsMac();
+
+ AppListServiceViewsBridge bridge_;
+
+ DISALLOW_COPY_AND_ASSIGN(AppListServiceViewsMac);
+};
+
+#endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_VIEWS_MAC_H_
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_views.h ('k') | chrome/browser/ui/app_list/app_list_service_views_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698