OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shell/browser/layout_test/layout_test_message_filter.h" | 5 #include "content/shell/browser/layout_test/layout_test_message_filter.h" |
6 | 6 |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/threading/thread_restrictions.h" | 8 #include "base/threading/thread_restrictions.h" |
9 #include "content/public/browser/child_process_security_policy.h" | 9 #include "content/public/browser/child_process_security_policy.h" |
10 #include "content/public/browser/permission_type.h" | 10 #include "content/public/browser/permission_type.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 ShellNetworkDelegate::SetAcceptAllCookies(accept); | 123 ShellNetworkDelegate::SetAcceptAllCookies(accept); |
124 } | 124 } |
125 | 125 |
126 void LayoutTestMessageFilter::OnDeleteAllCookies() { | 126 void LayoutTestMessageFilter::OnDeleteAllCookies() { |
127 request_context_getter_->GetURLRequestContext()->cookie_store() | 127 request_context_getter_->GetURLRequestContext()->cookie_store() |
128 ->GetCookieMonster() | 128 ->GetCookieMonster() |
129 ->DeleteAllAsync(net::CookieMonster::DeleteCallback()); | 129 ->DeleteAllAsync(net::CookieMonster::DeleteCallback()); |
130 } | 130 } |
131 | 131 |
132 void LayoutTestMessageFilter::OnSetPermission(const std::string& name, | 132 void LayoutTestMessageFilter::OnSetPermission(const std::string& name, |
133 PermissionStatus status, | 133 permission::Status status, |
134 const GURL& origin, | 134 const GURL& origin, |
135 const GURL& embedding_origin) { | 135 const GURL& embedding_origin) { |
136 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 136 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
137 | 137 |
138 content::PermissionType type; | 138 content::PermissionType type; |
139 if (name == "midi-sysex") { | 139 if (name == "midi-sysex") { |
140 type = PermissionType::MIDI_SYSEX; | 140 type = PermissionType::MIDI_SYSEX; |
141 } else if (name == "push-messaging") { | 141 } else if (name == "push-messaging") { |
142 type = PermissionType::PUSH_MESSAGING; | 142 type = PermissionType::PUSH_MESSAGING; |
143 } else if (name == "notifications") { | 143 } else if (name == "notifications") { |
(...skipping 23 matching lines...) Expand all Loading... |
167 } | 167 } |
168 | 168 |
169 void LayoutTestMessageFilter::OnSetBluetoothAdapter(const std::string& name) { | 169 void LayoutTestMessageFilter::OnSetBluetoothAdapter(const std::string& name) { |
170 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 170 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
171 SetBluetoothAdapter( | 171 SetBluetoothAdapter( |
172 render_process_id_, | 172 render_process_id_, |
173 LayoutTestBluetoothAdapterProvider::GetBluetoothAdapter(name)); | 173 LayoutTestBluetoothAdapterProvider::GetBluetoothAdapter(name)); |
174 } | 174 } |
175 | 175 |
176 } // namespace content | 176 } // namespace content |
OLD | NEW |