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

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

Issue 10332071: Pass command line arguments onto platform apps which provide the right intent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fixed, postResult added Created 8 years, 7 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) 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/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 6069 matching lines...) Expand 10 before | Expand all | Expand 10 after
6080 if (!old_contents) { 6080 if (!old_contents) {
6081 AutomationJSONReply(this, reply_message).SendError( 6081 AutomationJSONReply(this, reply_message).SendError(
6082 "Cannot identify selected tab contents."); 6082 "Cannot identify selected tab contents.");
6083 return; 6083 return;
6084 } 6084 }
6085 6085
6086 // This observer will delete itself. 6086 // This observer will delete itself.
6087 new AppLaunchObserver(&old_contents->GetController(), this, reply_message, 6087 new AppLaunchObserver(&old_contents->GetController(), this, reply_message,
6088 launch_container); 6088 launch_container);
6089 Browser::OpenApplication(profile(), extension, launch_container, GURL(), 6089 Browser::OpenApplication(profile(), extension, launch_container, GURL(),
6090 CURRENT_TAB); 6090 CURRENT_TAB, NULL);
6091 } 6091 }
6092 6092
6093 // Sample JSON input: { "command": "SetAppLaunchType", 6093 // Sample JSON input: { "command": "SetAppLaunchType",
6094 // "id": "ahfgeienlihckogmohjhadlkjgocpleb", 6094 // "id": "ahfgeienlihckogmohjhadlkjgocpleb",
6095 // "launch_type": "pinned" } 6095 // "launch_type": "pinned" }
6096 // Sample JSON output: {} 6096 // Sample JSON output: {}
6097 void TestingAutomationProvider::SetAppLaunchType( 6097 void TestingAutomationProvider::SetAppLaunchType(
6098 Browser* browser, 6098 Browser* browser,
6099 DictionaryValue* args, 6099 DictionaryValue* args,
6100 IPC::Message* reply_message) { 6100 IPC::Message* reply_message) {
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
7113 *browser_handle = browser_tracker_->Add(browser); 7113 *browser_handle = browser_tracker_->Add(browser);
7114 *success = true; 7114 *success = true;
7115 } 7115 }
7116 } 7116 }
7117 } 7117 }
7118 7118
7119 void TestingAutomationProvider::OnRemoveProvider() { 7119 void TestingAutomationProvider::OnRemoveProvider() {
7120 if (g_browser_process) 7120 if (g_browser_process)
7121 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 7121 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
7122 } 7122 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/background/background_mode_manager.cc » ('j') | chrome/browser/extensions/api/app/app_api.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698