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 "content/browser/plugin_service_impl.h" | 5 #include "content/browser/plugin_service_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 IPC::Channel* channel_; | 114 IPC::Channel* channel_; |
115 bool set_plugin_info_called_; | 115 bool set_plugin_info_called_; |
116 bool expect_fail_; | 116 bool expect_fail_; |
117 DISALLOW_COPY_AND_ASSIGN(MockPluginProcessHostClient); | 117 DISALLOW_COPY_AND_ASSIGN(MockPluginProcessHostClient); |
118 }; | 118 }; |
119 | 119 |
120 class MockPluginServiceFilter : public content::PluginServiceFilter { | 120 class MockPluginServiceFilter : public content::PluginServiceFilter { |
121 public: | 121 public: |
122 MockPluginServiceFilter() {} | 122 MockPluginServiceFilter() {} |
123 | 123 |
124 virtual bool IsPluginEnabled( | 124 virtual bool IsPluginAvailable( |
125 int render_process_id, | 125 int render_process_id, |
126 int render_view_id, | 126 int render_view_id, |
127 const void* context, | 127 const void* context, |
128 const GURL& url, | 128 const GURL& url, |
129 const GURL& policy_url, | 129 const GURL& policy_url, |
130 webkit::WebPluginInfo* plugin) OVERRIDE { return true; } | 130 webkit::WebPluginInfo* plugin) OVERRIDE { return true; } |
131 | 131 |
132 virtual bool CanLoadPlugin( | 132 virtual bool CanLoadPlugin( |
133 int render_process_id, | 133 int render_process_id, |
134 const FilePath& path) OVERRIDE { return false; } | 134 const FilePath& path) OVERRIDE { return false; } |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 BrowserThread::IO, FROM_HERE, | 370 BrowserThread::IO, FROM_HERE, |
371 base::Bind(&OpenChannel, &mock_client)); | 371 base::Bind(&OpenChannel, &mock_client)); |
372 RunMessageLoop(); | 372 RunMessageLoop(); |
373 EXPECT_TRUE(mock_client.get_resource_context_called()); | 373 EXPECT_TRUE(mock_client.get_resource_context_called()); |
374 EXPECT_TRUE(mock_client.set_plugin_info_called()); | 374 EXPECT_TRUE(mock_client.set_plugin_info_called()); |
375 EXPECT_TRUE(mock_client.on_found_plugin_process_host_called()); | 375 EXPECT_TRUE(mock_client.on_found_plugin_process_host_called()); |
376 EXPECT_TRUE(mock_client.on_sent_plugin_channel_request_called()); | 376 EXPECT_TRUE(mock_client.on_sent_plugin_channel_request_called()); |
377 } | 377 } |
378 | 378 |
379 } // namespace content | 379 } // namespace content |
OLD | NEW |