Chromium Code Reviews| 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/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 mimeType.mime_type = "*"; | 292 mimeType.mime_type = "*"; |
| 293 info.mime_types.push_back(mimeType); | 293 info.mime_types.push_back(mimeType); |
| 294 | 294 |
| 295 webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin( | 295 webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin( |
| 296 info, | 296 info, |
| 297 entry_points, | 297 entry_points, |
| 298 false); | 298 false); |
| 299 #endif | 299 #endif |
| 300 } | 300 } |
| 301 | 301 |
| 302 bool ChromeContentClient::CanSendWhileSwappedOut(const IPC::Message* msg) { | |
| 303 // Any Chrome-specific messages that must be allowed to be sent from swapped | |
| 304 // out renderers. | |
| 305 switch (msg->type()) { | |
| 306 case ChromeViewHostMsg_DomOperationResponse::ID: | |
| 307 return true; | |
| 308 default: | |
| 309 break; | |
| 310 } | |
| 311 return false; | |
| 312 } | |
| 313 | |
| 314 bool ChromeContentClient::CanHandleWhileSwappedOut( | 302 bool ChromeContentClient::CanHandleWhileSwappedOut( |
| 315 const IPC::Message& msg) { | 303 const IPC::Message& msg) { |
| 316 // Any Chrome-specific messages (apart from those listed in | 304 // Any Chrome-specific messages that must be handled by the browser when sent |
| 317 // CanSendWhileSwappedOut) that must be handled by the browser when sent from | 305 // from swapped out renderers. |
| 318 // swapped out renderers. | |
| 319 switch (msg.type()) { | 306 switch (msg.type()) { |
| 307 case ChromeViewHostMsg_DomOperationResponse::ID: | |
|
Charlie Reis
2011/12/01 23:13:02
Is this a worthwhile change independent of the res
supersat
2011/12/09 23:08:20
It's only needed if we change about:swappedout.
Charlie Reis
2011/12/12 22:20:36
Ok. It's still there in patch set 2, so you shoul
supersat
2011/12/15 19:30:49
Done. Not sure why it wasn't in patch set 2.
| |
| 320 case ChromeViewHostMsg_Snapshot::ID: | 308 case ChromeViewHostMsg_Snapshot::ID: |
| 321 return true; | 309 return true; |
| 322 default: | 310 default: |
| 323 break; | 311 break; |
| 324 } | 312 } |
| 325 return false; | 313 return false; |
| 326 } | 314 } |
| 327 | 315 |
| 328 std::string ChromeContentClient::GetUserAgent(bool* overriding) const { | 316 std::string ChromeContentClient::GetUserAgent(bool* overriding) const { |
| 329 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserAgent)) { | 317 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserAgent)) { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 409 DCHECK(sandbox_profile_resource_id); | 397 DCHECK(sandbox_profile_resource_id); |
| 410 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { | 398 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { |
| 411 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; | 399 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; |
| 412 return true; | 400 return true; |
| 413 } | 401 } |
| 414 return false; | 402 return false; |
| 415 } | 403 } |
| 416 #endif | 404 #endif |
| 417 | 405 |
| 418 } // namespace chrome | 406 } // namespace chrome |
| OLD | NEW |