OLD | NEW |
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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "chrome/browser/ui/browser_list.h" | 53 #include "chrome/browser/ui/browser_list.h" |
54 #include "chrome/browser/ui/browser_tabstrip.h" | 54 #include "chrome/browser/ui/browser_tabstrip.h" |
55 #include "chrome/browser/ui/browser_window.h" | 55 #include "chrome/browser/ui/browser_window.h" |
56 #include "chrome/browser/ui/host_desktop.h" | 56 #include "chrome/browser/ui/host_desktop.h" |
57 #include "chrome/browser/ui/omnibox/location_bar.h" | 57 #include "chrome/browser/ui/omnibox/location_bar.h" |
58 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" | 58 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" |
59 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 59 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
60 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 60 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
61 #include "chrome/common/chrome_notification_types.h" | 61 #include "chrome/common/chrome_notification_types.h" |
62 #include "chrome/common/chrome_paths.h" | 62 #include "chrome/common/chrome_paths.h" |
| 63 #include "chrome/common/chrome_process_type.h" |
63 #include "chrome/common/chrome_switches.h" | 64 #include "chrome/common/chrome_switches.h" |
64 #include "chrome/common/content_settings.h" | 65 #include "chrome/common/content_settings.h" |
65 #include "chrome/common/extensions/extension.h" | 66 #include "chrome/common/extensions/extension.h" |
66 #include "chrome/common/extensions/extension_constants.h" | 67 #include "chrome/common/extensions/extension_constants.h" |
67 #include "chrome/common/pref_names.h" | 68 #include "chrome/common/pref_names.h" |
68 #include "chrome/common/url_constants.h" | 69 #include "chrome/common/url_constants.h" |
69 #include "chrome/test/base/in_process_browser_test.h" | 70 #include "chrome/test/base/in_process_browser_test.h" |
70 #include "chrome/test/base/ui_test_utils.h" | 71 #include "chrome/test/base/ui_test_utils.h" |
71 #include "content/public/browser/browser_child_process_host_iterator.h" | 72 #include "content/public/browser/browser_child_process_host_iterator.h" |
72 #include "content/public/browser/browser_context.h" | 73 #include "content/public/browser/browser_context.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 bool ok = false; | 356 bool ok = false; |
356 plugin_prefs->EnablePlugin(enabled, plugin->path, | 357 plugin_prefs->EnablePlugin(enabled, plugin->path, |
357 base::Bind(CopyValueAndQuit<bool>, &ok)); | 358 base::Bind(CopyValueAndQuit<bool>, &ok)); |
358 content::RunMessageLoop(); | 359 content::RunMessageLoop(); |
359 return ok; | 360 return ok; |
360 } | 361 } |
361 | 362 |
362 int CountPluginsOnIOThread() { | 363 int CountPluginsOnIOThread() { |
363 int count = 0; | 364 int count = 0; |
364 for (content::BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) { | 365 for (content::BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) { |
365 if (iter.GetData().type == content::PROCESS_TYPE_PLUGIN || | 366 if (iter.GetData().process_type == content::PROCESS_TYPE_PLUGIN || |
366 iter.GetData().type == content::PROCESS_TYPE_PPAPI_PLUGIN) { | 367 iter.GetData().process_type == content::PROCESS_TYPE_PPAPI_PLUGIN) { |
367 count++; | 368 count++; |
368 } | 369 } |
369 } | 370 } |
370 return count; | 371 return count; |
371 } | 372 } |
372 | 373 |
373 int CountPlugins() { | 374 int CountPlugins() { |
374 int count = -1; | 375 int count = -1; |
375 BrowserThread::PostTaskAndReplyWithResult( | 376 BrowserThread::PostTaskAndReplyWithResult( |
376 BrowserThread::IO, FROM_HERE, | 377 BrowserThread::IO, FROM_HERE, |
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1949 this)); | 1950 this)); |
1950 | 1951 |
1951 MessageLoop::current()->Run(); | 1952 MessageLoop::current()->Run(); |
1952 } | 1953 } |
1953 | 1954 |
1954 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance, | 1955 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance, |
1955 MediaStreamDevicesControllerBrowserTest, | 1956 MediaStreamDevicesControllerBrowserTest, |
1956 testing::Bool()); | 1957 testing::Bool()); |
1957 | 1958 |
1958 } // namespace policy | 1959 } // namespace policy |
OLD | NEW |