OLD | NEW |
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/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 2737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2748 tab->Set("infobars", GetInfobarsInfo(tc)); | 2748 tab->Set("infobars", GetInfobarsInfo(tc)); |
2749 tab->SetBoolean("pinned", browser->IsTabPinned(i)); | 2749 tab->SetBoolean("pinned", browser->IsTabPinned(i)); |
2750 tabs->Append(tab); | 2750 tabs->Append(tab); |
2751 } | 2751 } |
2752 browser_item->Set("tabs", tabs); | 2752 browser_item->Set("tabs", tabs); |
2753 | 2753 |
2754 windows->Append(browser_item); | 2754 windows->Append(browser_item); |
2755 } | 2755 } |
2756 return_value->Set("windows", windows); | 2756 return_value->Set("windows", windows); |
2757 | 2757 |
| 2758 #if defined(OS_LINUX) |
| 2759 int flags = ChildProcessHost::CHILD_ALLOW_SELF; |
| 2760 #else |
| 2761 int flags = ChildProcessHost::CHILD_NORMAL; |
| 2762 #endif |
| 2763 |
2758 return_value->SetString("child_process_path", | 2764 return_value->SetString("child_process_path", |
2759 ChildProcessHost::GetChildPath(true).value()); | 2765 ChildProcessHost::GetChildPath(flags).value()); |
2760 // Child processes are the processes for plugins and other workers. | 2766 // Child processes are the processes for plugins and other workers. |
2761 // Add all child processes in a list of dictionaries, one dictionary item | 2767 // Add all child processes in a list of dictionaries, one dictionary item |
2762 // per child process. | 2768 // per child process. |
2763 ListValue* child_processes = new ListValue; | 2769 ListValue* child_processes = new ListValue; |
2764 base::WaitableEvent event(true /* manual reset */, | 2770 base::WaitableEvent event(true /* manual reset */, |
2765 false /* not initially signaled */); | 2771 false /* not initially signaled */); |
2766 CHECK(BrowserThread::PostTask( | 2772 CHECK(BrowserThread::PostTask( |
2767 BrowserThread::IO, FROM_HERE, | 2773 BrowserThread::IO, FROM_HERE, |
2768 new GetChildProcessHostInfoTask(&event, child_processes))); | 2774 new GetChildProcessHostInfoTask(&event, child_processes))); |
2769 event.Wait(); | 2775 event.Wait(); |
(...skipping 3420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6190 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); | 6196 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); |
6191 | 6197 |
6192 Send(reply_message_); | 6198 Send(reply_message_); |
6193 redirect_query_ = 0; | 6199 redirect_query_ = 0; |
6194 reply_message_ = NULL; | 6200 reply_message_ = NULL; |
6195 } | 6201 } |
6196 | 6202 |
6197 void TestingAutomationProvider::OnRemoveProvider() { | 6203 void TestingAutomationProvider::OnRemoveProvider() { |
6198 AutomationProviderList::GetInstance()->RemoveProvider(this); | 6204 AutomationProviderList::GetInstance()->RemoveProvider(this); |
6199 } | 6205 } |
OLD | NEW |