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

Side by Side Diff: chrome/browser/automation/automation_provider_observers.cc

Issue 7187023: Adding an experimental app notification API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1945 std::vector<DictionaryValue*>* GetAppInfoFromExtensions( 1945 std::vector<DictionaryValue*>* GetAppInfoFromExtensions(
1946 const ExtensionList* extensions, 1946 const ExtensionList* extensions,
1947 ExtensionPrefs* ext_prefs) { 1947 ExtensionPrefs* ext_prefs) {
1948 std::vector<DictionaryValue*>* apps_list = 1948 std::vector<DictionaryValue*>* apps_list =
1949 new std::vector<DictionaryValue*>(); 1949 new std::vector<DictionaryValue*>();
1950 for (ExtensionList::const_iterator ext = extensions->begin(); 1950 for (ExtensionList::const_iterator ext = extensions->begin();
1951 ext != extensions->end(); ++ext) { 1951 ext != extensions->end(); ++ext) {
1952 // Only return information about extensions that are actually apps. 1952 // Only return information about extensions that are actually apps.
1953 if ((*ext)->is_app()) { 1953 if ((*ext)->is_app()) {
1954 DictionaryValue* app_info = new DictionaryValue(); 1954 DictionaryValue* app_info = new DictionaryValue();
1955 AppLauncherHandler::CreateAppInfo(*ext, ext_prefs, app_info); 1955 AppLauncherHandler::CreateAppInfo(*ext, NULL, ext_prefs, app_info);
1956 app_info->SetBoolean("is_component_extension", 1956 app_info->SetBoolean("is_component_extension",
1957 (*ext)->location() == Extension::COMPONENT); 1957 (*ext)->location() == Extension::COMPONENT);
1958 1958
1959 // Convert the launch_type integer into a more descriptive string. 1959 // Convert the launch_type integer into a more descriptive string.
1960 int launch_type; 1960 int launch_type;
1961 app_info->GetInteger("launch_type", &launch_type); 1961 app_info->GetInteger("launch_type", &launch_type);
1962 if (launch_type == ExtensionPrefs::LAUNCH_PINNED) { 1962 if (launch_type == ExtensionPrefs::LAUNCH_PINNED) {
1963 app_info->SetString("launch_type", "pinned"); 1963 app_info->SetString("launch_type", "pinned");
1964 } else if (launch_type == ExtensionPrefs::LAUNCH_REGULAR) { 1964 } else if (launch_type == ExtensionPrefs::LAUNCH_REGULAR) {
1965 app_info->SetString("launch_type", "regular"); 1965 app_info->SetString("launch_type", "regular");
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
2562 this, 2562 this,
2563 &WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread)); 2563 &WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread));
2564 } 2564 }
2565 2565
2566 void WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread() { 2566 void WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread() {
2567 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 2567 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
2568 if (automation_) 2568 if (automation_)
2569 automation_->Send(reply_message_.release()); 2569 automation_->Send(reply_message_.release());
2570 Release(); 2570 Release();
2571 } 2571 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_app_api.h » ('j') | chrome/browser/extensions/extension_app_api.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698