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

Unified Diff: chrome/browser/extensions/api/terminal/terminal_extension_helper.h

Issue 9297008: [HTerm-Crosh] Add key shortcut for opening Crosh on ChromeOS Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 11 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/extensions/api/terminal/terminal_extension_helper.h
diff --git a/chrome/browser/extensions/api/terminal/terminal_extension_helper.h b/chrome/browser/extensions/api/terminal/terminal_extension_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..58caca400dcdf3d30129366f1dafa3c6a32865ce
--- /dev/null
+++ b/chrome/browser/extensions/api/terminal/terminal_extension_helper.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2012 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_EXTENSIONS_API_TERMINAL_TERMINAL_EXTENSION_HELPER_H_
+#define CHROME_BROWSER_EXTENSIONS_API_TERMINAL_TERMINAL_EXTENSION_HELPER_H_
+#pragma once
+
+#include <string>
+
+#include "googleurl/src/gurl.h"
+
+class Profile;
+
+class TerminalExtensionHelper {
+ public:
+ // Checks if the extension whose id is |extension_id| is allowed to access
+ // terminalPrivate API.
+ static bool AllowAccessToExtension(Profile* profile,
+ const std::string& extension_id);
+ // Returns Hterm extension's entry point for Crosh. If no HTerm extension is
+ // installed, returns empty url.
+ static GURL GetCroshExtensionURL(Profile* profile);
+
+ private:
+ // Returns id of installed HTerm extension (if any), or NULL.
+ static const char* GetTerminalExtensionId(Profile* profile);
+};
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_TERMINAL_TERMINAL_EXTENSION_HELPER_H_
« no previous file with comments | « chrome/app/chrome_command_ids.h ('k') | chrome/browser/extensions/api/terminal/terminal_extension_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698