OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/views/ash/launcher/launcher_app_tab_helper.h" | 5 #include "chrome/browser/ui/ash/launcher/launcher_app_tab_helper.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 const extensions::Extension* GetExtensionForTab(Profile* profile, | 15 const extensions::Extension* GetExtensionForTab(Profile* profile, |
(...skipping 22 matching lines...) Expand all Loading... |
38 } | 38 } |
39 | 39 |
40 std::string LauncherAppTabHelper::GetAppID(TabContents* tab) { | 40 std::string LauncherAppTabHelper::GetAppID(TabContents* tab) { |
41 const extensions::Extension* extension = GetExtensionForTab(profile_, tab); | 41 const extensions::Extension* extension = GetExtensionForTab(profile_, tab); |
42 return extension ? extension->id() : std::string(); | 42 return extension ? extension->id() : std::string(); |
43 } | 43 } |
44 | 44 |
45 bool LauncherAppTabHelper::IsValidID(const std::string& id) { | 45 bool LauncherAppTabHelper::IsValidID(const std::string& id) { |
46 return GetExtensionByID(profile_, id) != NULL; | 46 return GetExtensionByID(profile_, id) != NULL; |
47 } | 47 } |
OLD | NEW |