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

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

Issue 10700130: Introduce LaunchParams struct for opening chrome apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bad merge Created 8 years, 5 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 5712 matching lines...) Expand 10 before | Expand all | Expand 10 after
5723 WebContents* old_contents = chrome::GetActiveWebContents(browser); 5723 WebContents* old_contents = chrome::GetActiveWebContents(browser);
5724 if (!old_contents) { 5724 if (!old_contents) {
5725 AutomationJSONReply(this, reply_message).SendError( 5725 AutomationJSONReply(this, reply_message).SendError(
5726 "Cannot identify selected tab contents."); 5726 "Cannot identify selected tab contents.");
5727 return; 5727 return;
5728 } 5728 }
5729 5729
5730 // This observer will delete itself. 5730 // This observer will delete itself.
5731 new AppLaunchObserver(&old_contents->GetController(), this, reply_message, 5731 new AppLaunchObserver(&old_contents->GetController(), this, reply_message,
5732 launch_container); 5732 launch_container);
5733 application_launch::OpenApplication(profile(), extension, launch_container, 5733 application_launch::OpenApplication(application_launch::LaunchParams(
5734 GURL(), CURRENT_TAB, NULL); 5734 profile(), extension, launch_container, CURRENT_TAB));
5735 } 5735 }
5736 5736
5737 // Sample JSON input: { "command": "SetAppLaunchType", 5737 // Sample JSON input: { "command": "SetAppLaunchType",
5738 // "id": "ahfgeienlihckogmohjhadlkjgocpleb", 5738 // "id": "ahfgeienlihckogmohjhadlkjgocpleb",
5739 // "launch_type": "pinned" } 5739 // "launch_type": "pinned" }
5740 // Sample JSON output: {} 5740 // Sample JSON output: {}
5741 void TestingAutomationProvider::SetAppLaunchType( 5741 void TestingAutomationProvider::SetAppLaunchType(
5742 Browser* browser, 5742 Browser* browser,
5743 DictionaryValue* args, 5743 DictionaryValue* args,
5744 IPC::Message* reply_message) { 5744 IPC::Message* reply_message) {
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
6751 void TestingAutomationProvider::OnRemoveProvider() { 6751 void TestingAutomationProvider::OnRemoveProvider() {
6752 if (g_browser_process) 6752 if (g_browser_process)
6753 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6753 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6754 } 6754 }
6755 6755
6756 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, 6756 void TestingAutomationProvider::EnsureTabSelected(Browser* browser,
6757 WebContents* tab) { 6757 WebContents* tab) {
6758 if (chrome::GetActiveWebContents(browser) != tab) 6758 if (chrome::GetActiveWebContents(browser) != tab)
6759 chrome::ActivateTabAt(browser, chrome::GetIndexOfTab(browser, tab), true); 6759 chrome::ActivateTabAt(browser, chrome::GetIndexOfTab(browser, tab), true);
6760 } 6760 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/extension_app_provider.cc ('k') | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698