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

Side by Side Diff: chrome/browser/apps/per_app_settings_service.h

Issue 1336993002: Straighten up includes of host_desktop.h/host_desktop_type.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@host_desktop_type
Patch Set: Build fixes for Windows and Mac 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_APPS_PER_APP_SETTINGS_SERVICE_H_ 5 #ifndef CHROME_BROWSER_APPS_PER_APP_SETTINGS_SERVICE_H_
6 #define CHROME_BROWSER_APPS_PER_APP_SETTINGS_SERVICE_H_ 6 #define CHROME_BROWSER_APPS_PER_APP_SETTINGS_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "chrome/browser/ui/host_desktop.h" 11 #include "base/macros.h"
12 #include "components/keyed_service/core/keyed_service.h" 12 #include "components/keyed_service/core/keyed_service.h"
13 #include "ui/gfx/host_desktop_type.h"
13 14
14 // Stores settings for apps that only persist until the browser context is 15 // Stores settings for apps that only persist until the browser context is
15 // destroyed. 16 // destroyed.
16 class PerAppSettingsService : public KeyedService { 17 class PerAppSettingsService : public KeyedService {
17 public: 18 public:
18 PerAppSettingsService(); 19 PerAppSettingsService();
19 ~PerAppSettingsService() override; 20 ~PerAppSettingsService() override;
20 21
21 // Sets/gets the desktop that |app_id| was last launched from. 22 // Sets/gets the desktop that |app_id| was last launched from.
22 void SetDesktopLastLaunchedFrom(const std::string& app_id, 23 void SetDesktopLastLaunchedFrom(const std::string& app_id,
23 ui::HostDesktopType host); 24 ui::HostDesktopType host);
24 ui::HostDesktopType GetDesktopLastLaunchedFrom( 25 ui::HostDesktopType GetDesktopLastLaunchedFrom(
25 const std::string& app_id) const; 26 const std::string& app_id) const;
26 bool HasDesktopLastLaunchedFrom(const std::string& app_id) const; 27 bool HasDesktopLastLaunchedFrom(const std::string& app_id) const;
27 28
28 private: 29 private:
29 typedef std::map<std::string, ui::HostDesktopType> DesktopMap; 30 typedef std::map<std::string, ui::HostDesktopType> DesktopMap;
30 DesktopMap default_desktops_; 31 DesktopMap default_desktops_;
31 32
32 DISALLOW_COPY_AND_ASSIGN(PerAppSettingsService); 33 DISALLOW_COPY_AND_ASSIGN(PerAppSettingsService);
33 }; 34 };
34 35
35 #endif // CHROME_BROWSER_APPS_PER_APP_SETTINGS_SERVICE_H_ 36 #endif // CHROME_BROWSER_APPS_PER_APP_SETTINGS_SERVICE_H_
36 37
OLDNEW
« no previous file with comments | « chrome/browser/apps/ephemeral_app_launcher_browsertest.cc ('k') | chrome/browser/apps/per_app_settings_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698