| Index: remoting/host/chromoting_param_traits.cc
|
| diff --git a/remoting/host/chromoting_param_traits.cc b/remoting/host/chromoting_param_traits.cc
|
| index 6e47494ec30560851997f344aa12ad31d5278179..de62d761859b3b4132fb4b84ba9cfe952f1b7575 100644
|
| --- a/remoting/host/chromoting_param_traits.cc
|
| +++ b/remoting/host/chromoting_param_traits.cc
|
| @@ -212,5 +212,73 @@ void ParamTraits<remoting::ScreenResolution>::Log(
|
| p.dpi().x(), p.dpi().y()));
|
| }
|
|
|
| +// static
|
| +void ParamTraits<remoting::DesktopEnvironmentOptions>::Write(
|
| + base::Pickle* m,
|
| + const remoting::DesktopEnvironmentOptions& p) {
|
| + m->WriteBool(p.enable_curtaining());
|
| + m->WriteBool(p.enable_user_interface());
|
| + m->WriteBool(p.desktop_capture_options()->use_update_notifications());
|
| + m->WriteBool(p.desktop_capture_options()->disable_effects());
|
| + m->WriteBool(p.desktop_capture_options()->detect_updated_region());
|
| +#if defined(WEBRTC_WIN)
|
| + m->WriteBool(p.desktop_capture_options()->allow_use_magnification_api());
|
| + m->WriteBool(p.desktop_capture_options()->allow_directx_capturer());
|
| +#endif // defined(WEBRTC_WIN)
|
| +}
|
| +
|
| +// static
|
| +bool ParamTraits<remoting::DesktopEnvironmentOptions>::Read(
|
| + const base::Pickle* m,
|
| + base::PickleIterator* iter,
|
| + remoting::DesktopEnvironmentOptions* r) {
|
| + *r = remoting::DesktopEnvironmentOptions::CreateDefault();
|
| + bool enable_curtaining;
|
| + bool enable_user_interface;
|
| + bool use_update_notifications;
|
| + bool disable_effects;
|
| + bool detect_updated_region;
|
| +
|
| + if (!iter->ReadBool(&enable_curtaining) ||
|
| + !iter->ReadBool(&enable_user_interface) ||
|
| + !iter->ReadBool(&use_update_notifications) ||
|
| + !iter->ReadBool(&disable_effects) ||
|
| + !iter->ReadBool(&detect_updated_region)) {
|
| + return false;
|
| + }
|
| +
|
| + r->set_enable_curtaining(enable_curtaining);
|
| + r->set_enable_user_interface(enable_user_interface);
|
| + r->desktop_capture_options()->set_use_update_notifications(
|
| + use_update_notifications);
|
| + r->desktop_capture_options()->set_detect_updated_region(
|
| + detect_updated_region);
|
| + r->desktop_capture_options()->set_disable_effects(disable_effects);
|
| +
|
| +#if defined(WEBRTC_WIN)
|
| + bool allow_use_magnification_api;
|
| + bool allow_directx_capturer;
|
| +
|
| + if (!iter->ReadBool(&allow_use_magnification_api) ||
|
| + !iter->ReadBool(&allow_directx_capturer)) {
|
| + return false;
|
| + }
|
| +
|
| + r->desktop_capture_options()->set_allow_use_magnification_api(
|
| + allow_use_magnification_api);
|
| + r->desktop_capture_options()->set_allow_directx_capturer(
|
| + allow_directx_capturer);
|
| +#endif // defined(WEBRTC_WIN)
|
| +
|
| + return true;
|
| +}
|
| +
|
| +// static
|
| +void ParamTraits<remoting::DesktopEnvironmentOptions>::Log(
|
| + const remoting::DesktopEnvironmentOptions& p,
|
| + std::string* l) {
|
| + l->append("DesktopEnvironmentOptions()");
|
| +}
|
| +
|
| } // namespace IPC
|
|
|
|
|