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

Side by Side Diff: chrome/browser/chromeos/note_taking_app_utils.cc

Issue 2258553004: Add pref to enable/disable palette tray. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Rebase Created 4 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
« no previous file with comments | « ash/shell/shell_delegate_impl.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/chromeos/note_taking_app_utils.h" 5 #include "chrome/browser/chromeos/note_taking_app_utils.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "apps/launcher.h" 10 #include "apps/launcher.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 id, extensions::ExtensionRegistry::ENABLED); 62 id, extensions::ExtensionRegistry::ENABLED);
63 } 63 }
64 } 64 }
65 return nullptr; 65 return nullptr;
66 } 66 }
67 67
68 } // namespace 68 } // namespace
69 69
70 bool IsNoteTakingAppAvailable(Profile* profile) { 70 bool IsNoteTakingAppAvailable(Profile* profile) {
71 DCHECK(profile); 71 DCHECK(profile);
72 return ash::IsPaletteEnabled() && GetApp(profile); 72 return ash::IsPaletteFeatureEnabled() && GetApp(profile);
73 } 73 }
74 74
75 void LaunchNoteTakingAppForNewNote(Profile* profile, 75 void LaunchNoteTakingAppForNewNote(Profile* profile,
76 const base::FilePath& path) { 76 const base::FilePath& path) {
77 DCHECK(profile); 77 DCHECK(profile);
78 const extensions::Extension* app = GetApp(profile); 78 const extensions::Extension* app = GetApp(profile);
79 if (!app) { 79 if (!app) {
80 LOG(ERROR) << "Failed to find note-taking app"; 80 LOG(ERROR) << "Failed to find note-taking app";
81 return; 81 return;
82 } 82 }
83 83
84 auto action_data = base::MakeUnique<app_runtime::ActionData>(); 84 auto action_data = base::MakeUnique<app_runtime::ActionData>();
85 action_data->action_type = app_runtime::ActionType::ACTION_TYPE_NEW_NOTE; 85 action_data->action_type = app_runtime::ActionType::ACTION_TYPE_NEW_NOTE;
86 apps::LaunchPlatformAppWithAction(profile, app, std::move(action_data), path); 86 apps::LaunchPlatformAppWithAction(profile, app, std::move(action_data), path);
87 } 87 }
88 88
89 } // namespace chromeos 89 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/shell/shell_delegate_impl.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698