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/automation/automation_provider_observers.h" | 5 #include "chrome/browser/automation/automation_provider_observers.h" |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "chrome/browser/bookmarks/bookmark_model.h" | 28 #include "chrome/browser/bookmarks/bookmark_model.h" |
29 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 29 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
30 #include "chrome/browser/browser_process.h" | 30 #include "chrome/browser/browser_process.h" |
31 #include "chrome/browser/chrome_notification_types.h" | 31 #include "chrome/browser/chrome_notification_types.h" |
32 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 32 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
33 #include "chrome/browser/extensions/crx_installer.h" | 33 #include "chrome/browser/extensions/crx_installer.h" |
34 #include "chrome/browser/extensions/extension_host.h" | 34 #include "chrome/browser/extensions/extension_host.h" |
35 #include "chrome/browser/extensions/extension_service.h" | 35 #include "chrome/browser/extensions/extension_service.h" |
36 #include "chrome/browser/extensions/extension_system.h" | 36 #include "chrome/browser/extensions/extension_system.h" |
37 #include "chrome/browser/extensions/extension_tab_util.h" | 37 #include "chrome/browser/extensions/extension_tab_util.h" |
| 38 #include "chrome/browser/extensions/launch_util.h" |
38 #include "chrome/browser/history/history_types.h" | 39 #include "chrome/browser/history/history_types.h" |
39 #include "chrome/browser/history/top_sites.h" | 40 #include "chrome/browser/history/top_sites.h" |
40 #include "chrome/browser/infobars/confirm_infobar_delegate.h" | 41 #include "chrome/browser/infobars/confirm_infobar_delegate.h" |
41 #include "chrome/browser/infobars/infobar_service.h" | 42 #include "chrome/browser/infobars/infobar_service.h" |
42 #include "chrome/browser/metrics/metric_event_duration_details.h" | 43 #include "chrome/browser/metrics/metric_event_duration_details.h" |
43 #include "chrome/browser/notifications/balloon.h" | 44 #include "chrome/browser/notifications/balloon.h" |
44 #include "chrome/browser/notifications/balloon_collection.h" | 45 #include "chrome/browser/notifications/balloon_collection.h" |
45 #include "chrome/browser/notifications/balloon_host.h" | 46 #include "chrome/browser/notifications/balloon_host.h" |
46 #include "chrome/browser/notifications/balloon_notification_ui_manager.h" | 47 #include "chrome/browser/notifications/balloon_notification_ui_manager.h" |
47 #include "chrome/browser/notifications/notification.h" | 48 #include "chrome/browser/notifications/notification.h" |
(...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1761 "is_component_extension", | 1762 "is_component_extension", |
1762 (*ext)->location() == extensions::Manifest::COMPONENT); | 1763 (*ext)->location() == extensions::Manifest::COMPONENT); |
1763 | 1764 |
1764 // Convert the launch_type integer into a more descriptive string. | 1765 // Convert the launch_type integer into a more descriptive string. |
1765 int launch_type; | 1766 int launch_type; |
1766 const char* kLaunchType = "launch_type"; | 1767 const char* kLaunchType = "launch_type"; |
1767 if (!app_info->GetInteger(kLaunchType, &launch_type)) { | 1768 if (!app_info->GetInteger(kLaunchType, &launch_type)) { |
1768 NOTREACHED() << "Can't get integer from key " << kLaunchType; | 1769 NOTREACHED() << "Can't get integer from key " << kLaunchType; |
1769 continue; | 1770 continue; |
1770 } | 1771 } |
1771 if (launch_type == extensions::ExtensionPrefs::LAUNCH_TYPE_PINNED) { | 1772 if (launch_type == extensions::LAUNCH_TYPE_PINNED) { |
1772 app_info->SetString(kLaunchType, "pinned"); | 1773 app_info->SetString(kLaunchType, "pinned"); |
1773 } else if (launch_type == | 1774 } else if (launch_type == extensions::LAUNCH_TYPE_REGULAR) { |
1774 extensions::ExtensionPrefs::LAUNCH_TYPE_REGULAR) { | |
1775 app_info->SetString(kLaunchType, "regular"); | 1775 app_info->SetString(kLaunchType, "regular"); |
1776 } else if (launch_type == | 1776 } else if (launch_type == extensions::LAUNCH_TYPE_FULLSCREEN) { |
1777 extensions::ExtensionPrefs::LAUNCH_TYPE_FULLSCREEN) { | |
1778 app_info->SetString(kLaunchType, "fullscreen"); | 1777 app_info->SetString(kLaunchType, "fullscreen"); |
1779 } else if (launch_type == | 1778 } else if (launch_type == extensions::LAUNCH_TYPE_WINDOW) { |
1780 extensions::ExtensionPrefs::LAUNCH_TYPE_WINDOW) { | |
1781 app_info->SetString(kLaunchType, "window"); | 1779 app_info->SetString(kLaunchType, "window"); |
1782 } else { | 1780 } else { |
1783 app_info->SetString(kLaunchType, "unknown"); | 1781 app_info->SetString(kLaunchType, "unknown"); |
1784 } | 1782 } |
1785 | 1783 |
1786 apps_list->push_back(app_info); | 1784 apps_list->push_back(app_info); |
1787 } | 1785 } |
1788 } | 1786 } |
1789 return apps_list; | 1787 return apps_list; |
1790 } | 1788 } |
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2647 if (automation_.get()) { | 2645 if (automation_.get()) { |
2648 AutomationJSONReply(automation_.get(), reply_message_.release()) | 2646 AutomationJSONReply(automation_.get(), reply_message_.release()) |
2649 .SendSuccess(NULL); | 2647 .SendSuccess(NULL); |
2650 } | 2648 } |
2651 delete this; | 2649 delete this; |
2652 } | 2650 } |
2653 } else { | 2651 } else { |
2654 NOTREACHED(); | 2652 NOTREACHED(); |
2655 } | 2653 } |
2656 } | 2654 } |
OLD | NEW |