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

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: Fix bad merge 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 6097 matching lines...) Expand 10 before | Expand all | Expand 10 after
6108 if (!old_contents) { 6108 if (!old_contents) {
6109 AutomationJSONReply(this, reply_message).SendError( 6109 AutomationJSONReply(this, reply_message).SendError(
6110 "Cannot identify selected tab contents."); 6110 "Cannot identify selected tab contents.");
6111 return; 6111 return;
6112 } 6112 }
6113 6113
6114 // This observer will delete itself. 6114 // This observer will delete itself.
6115 new AppLaunchObserver(&old_contents->GetController(), this, reply_message, 6115 new AppLaunchObserver(&old_contents->GetController(), this, reply_message,
6116 launch_container); 6116 launch_container);
6117 Browser::OpenApplication(profile(), extension, launch_container, GURL(), 6117 Browser::OpenApplication(profile(), extension, launch_container, GURL(),
6118 CURRENT_TAB); 6118 CURRENT_TAB, NULL);
6119 } 6119 }
6120 6120
6121 // Sample JSON input: { "command": "SetAppLaunchType", 6121 // Sample JSON input: { "command": "SetAppLaunchType",
6122 // "id": "ahfgeienlihckogmohjhadlkjgocpleb", 6122 // "id": "ahfgeienlihckogmohjhadlkjgocpleb",
6123 // "launch_type": "pinned" } 6123 // "launch_type": "pinned" }
6124 // Sample JSON output: {} 6124 // Sample JSON output: {}
6125 void TestingAutomationProvider::SetAppLaunchType( 6125 void TestingAutomationProvider::SetAppLaunchType(
6126 Browser* browser, 6126 Browser* browser,
6127 DictionaryValue* args, 6127 DictionaryValue* args,
6128 IPC::Message* reply_message) { 6128 IPC::Message* reply_message) {
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
7158 *browser_handle = browser_tracker_->Add(browser); 7158 *browser_handle = browser_tracker_->Add(browser);
7159 *success = true; 7159 *success = true;
7160 } 7160 }
7161 } 7161 }
7162 } 7162 }
7163 7163
7164 void TestingAutomationProvider::OnRemoveProvider() { 7164 void TestingAutomationProvider::OnRemoveProvider() {
7165 if (g_browser_process) 7165 if (g_browser_process)
7166 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 7166 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
7167 } 7167 }
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