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

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

Issue 2131463002: Purge the App Launcher code from Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Zap mac-specific icon assets Created 4 years, 5 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_mac.h
diff --git a/chrome/browser/ui/app_list/app_list_service_mac.h b/chrome/browser/ui/app_list/app_list_service_mac.h
deleted file mode 100644
index b9eb8ded28ec454f8222ce078a2354e34df9a078..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/app_list/app_list_service_mac.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright 2013 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_MAC_H_
-#define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_MAC_H_
-
-#import <Cocoa/Cocoa.h>
-
-#include <memory>
-
-#include "base/mac/scoped_nsobject.h"
-#include "base/macros.h"
-#include "chrome/browser/apps/app_shim/app_shim_handler_mac.h"
-#include "chrome/browser/ui/app_list/app_list_service_impl.h"
-
-@class AppListAnimationController;
-
-namespace display {
-class Display;
-}
-
-namespace gfx {
-class Point;
-}
-
-// AppListServiceMac manages global resources needed for the app list to
-// operate, and controls when and how the app list is opened and closed.
-class AppListServiceMac : public AppListServiceImpl,
- public apps::AppShimHandler {
- public:
- ~AppListServiceMac() override;
-
- // Finds the position for a window to anchor it to the dock. This chooses the
- // most appropriate position for the window based on whether the dock exists,
- // the position of the dock (calculated by the difference between the display
- // bounds and display work area), whether the mouse cursor is visible and its
- // position. Sets |target_origin| to the coordinates for the window to appear
- // at, and |start_origin| to the coordinates the window should begin animating
- // from. Coordinates are for the bottom-left coordinate of the window, in
- // AppKit space (Y positive is up).
- static void FindAnchorPoint(const gfx::Size& window_size,
- const display::Display& display,
- int primary_display_height,
- bool cursor_is_visible,
- const gfx::Point& cursor,
- NSPoint* target_origin,
- NSPoint* start_origin);
-
- void ShowWindowNearDock();
- void WindowAnimationDidEnd();
- void InitWithProfilePath(Profile* initial_profile,
- const base::FilePath& profile_path);
-
- // AppListService overrides:
- void Init(Profile* initial_profile) override;
- void DismissAppList() override;
- void ShowForCustomLauncherPage(Profile* profile) override;
- void HideCustomLauncherPage() override;
- bool IsAppListVisible() const override;
- void EnableAppList(Profile* initial_profile,
- AppListEnableSource enable_source) override;
- gfx::NativeWindow GetAppListWindow() override;
- void CreateShortcut() override;
-
- // AppShimHandler overrides:
- void OnShimLaunch(apps::AppShimHandler::Host* host,
- apps::AppShimLaunchType launch_type,
- const std::vector<base::FilePath>& files) override;
- void OnShimClose(apps::AppShimHandler::Host* host) override;
- void OnShimFocus(apps::AppShimHandler::Host* host,
- apps::AppShimFocusType focus_type,
- const std::vector<base::FilePath>& files) override;
- void OnShimSetHidden(apps::AppShimHandler::Host* host, bool hidden) override;
- void OnShimQuit(apps::AppShimHandler::Host* host) override;
-
- protected:
- AppListServiceMac();
-
- // Returns the native window for the app list, or nil if can't be shown yet.
- // Note that, unlike GetAppListWindow(), this does not return null when the
- // app list is loaded, but not visible.
- virtual NSWindow* GetNativeWindow() const = 0;
-
- // If the app list is loaded, return true. Otherwise, if supported,
- // synchronously prepare an unpopulated app list window to begin showing on
- // screen and return true. If that's not supported, return false.
- virtual bool ReadyToShow() = 0;
-
- private:
- base::scoped_nsobject<AppListAnimationController> animation_controller_;
- base::scoped_nsobject<NSRunningApplication> previously_active_application_;
- NSPoint last_start_origin_;
-
- DISALLOW_COPY_AND_ASSIGN(AppListServiceMac);
-};
-
-#endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698