OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile_manager.h" | 7 #include "chrome/browser/profiles/profile_manager.h" |
8 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" | 8 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" |
9 #include "chrome/common/pref_names.h" | 9 #include "chrome/common/pref_names.h" |
10 #include "chrome/grit/theme_resources.h" | 10 #include "chrome/grit/theme_resources.h" |
11 #include "components/prefs/pref_service.h" | 11 #include "components/prefs/pref_service.h" |
12 #include "content/public/common/mojo_shell_connection.h" | 12 #include "content/public/common/mojo_shell_connection.h" |
13 #include "mojo/shell/public/cpp/connector.h" | 13 #include "services/shell/public/cpp/connector.h" |
14 #include "skia/public/type_converters.h" | 14 #include "skia/public/type_converters.h" |
15 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
16 | 16 |
17 class ChromeShelfItemDelegate : public mash::shelf::mojom::ShelfItemDelegate { | 17 class ChromeShelfItemDelegate : public mash::shelf::mojom::ShelfItemDelegate { |
18 public: | 18 public: |
19 ChromeShelfItemDelegate() : item_delegate_binding_(this) {} | 19 ChromeShelfItemDelegate() : item_delegate_binding_(this) {} |
20 ~ChromeShelfItemDelegate() override {} | 20 ~ChromeShelfItemDelegate() override {} |
21 | 21 |
22 mash::shelf::mojom::ShelfItemDelegateAssociatedPtrInfo | 22 mash::shelf::mojom::ShelfItemDelegateAssociatedPtrInfo |
23 CreateInterfacePtrInfoAndBind(mojo::AssociatedGroup* associated_group) { | 23 CreateInterfacePtrInfoAndBind(mojo::AssociatedGroup* associated_group) { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 void ChromeMashShelfController::OnAutoHideBehaviorChanged( | 108 void ChromeMashShelfController::OnAutoHideBehaviorChanged( |
109 mash::shelf::mojom::AutoHideBehavior auto_hide) { | 109 mash::shelf::mojom::AutoHideBehavior auto_hide) { |
110 const char* value = ash::AutoHideBehaviorToPref( | 110 const char* value = ash::AutoHideBehaviorToPref( |
111 static_cast<ash::ShelfAutoHideBehavior>(auto_hide)); | 111 static_cast<ash::ShelfAutoHideBehavior>(auto_hide)); |
112 if (!value) | 112 if (!value) |
113 return; | 113 return; |
114 Profile* profile = ProfileManager::GetActiveUserProfile(); | 114 Profile* profile = ProfileManager::GetActiveUserProfile(); |
115 profile->GetPrefs()->SetString(prefs::kShelfAutoHideBehaviorLocal, value); | 115 profile->GetPrefs()->SetString(prefs::kShelfAutoHideBehaviorLocal, value); |
116 } | 116 } |
OLD | NEW |