| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/guest_view/extension_options/extension_options_gues
t.h" | 5 #include "extensions/browser/guest_view/extension_options/extension_options_gues
t.h" |
| 6 | 6 |
| 7 #include "base/metrics/user_metrics.h" | 7 #include "base/metrics/user_metrics.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "components/crx_file/id_util.h" | 9 #include "components/crx_file/id_util.h" |
| 10 #include "content/public/browser/navigation_details.h" | 10 #include "content/public/browser/navigation_details.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 false)); | 229 false)); |
| 230 } | 230 } |
| 231 return false; | 231 return false; |
| 232 } | 232 } |
| 233 | 233 |
| 234 void ExtensionOptionsGuest::DidNavigateMainFrame( | 234 void ExtensionOptionsGuest::DidNavigateMainFrame( |
| 235 const content::LoadCommittedDetails& details, | 235 const content::LoadCommittedDetails& details, |
| 236 const content::FrameNavigateParams& params) { | 236 const content::FrameNavigateParams& params) { |
| 237 if (attached() && (params.url.GetOrigin() != options_page_.GetOrigin())) { | 237 if (attached() && (params.url.GetOrigin() != options_page_.GetOrigin())) { |
| 238 base::RecordAction(base::UserMetricsAction("BadMessageTerminate_EOG")); | 238 base::RecordAction(base::UserMetricsAction("BadMessageTerminate_EOG")); |
| 239 base::KillProcess( | 239 web_contents()->GetRenderProcessHost()->FastShutdown( |
| 240 web_contents()->GetRenderProcessHost()->GetHandle(), | |
| 241 content::RESULT_CODE_KILLED_BAD_MESSAGE, false /* wait */); | 240 content::RESULT_CODE_KILLED_BAD_MESSAGE, false /* wait */); |
| 242 } | 241 } |
| 243 } | 242 } |
| 244 | 243 |
| 245 bool ExtensionOptionsGuest::OnMessageReceived(const IPC::Message& message) { | 244 bool ExtensionOptionsGuest::OnMessageReceived(const IPC::Message& message) { |
| 246 bool handled = true; | 245 bool handled = true; |
| 247 IPC_BEGIN_MESSAGE_MAP(ExtensionOptionsGuest, message) | 246 IPC_BEGIN_MESSAGE_MAP(ExtensionOptionsGuest, message) |
| 248 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) | 247 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) |
| 249 IPC_MESSAGE_UNHANDLED(handled = false) | 248 IPC_MESSAGE_UNHANDLED(handled = false) |
| 250 IPC_END_MESSAGE_MAP() | 249 IPC_END_MESSAGE_MAP() |
| (...skipping 25 matching lines...) Expand all Loading... |
| 276 attach_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); | 275 attach_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); |
| 277 | 276 |
| 278 // Call SetAutoSize to apply all the appropriate validation and clipping of | 277 // Call SetAutoSize to apply all the appropriate validation and clipping of |
| 279 // values. | 278 // values. |
| 280 SetAutoSize(auto_size_enabled, | 279 SetAutoSize(auto_size_enabled, |
| 281 gfx::Size(min_width, min_height), | 280 gfx::Size(min_width, min_height), |
| 282 gfx::Size(max_width, max_height)); | 281 gfx::Size(max_width, max_height)); |
| 283 } | 282 } |
| 284 | 283 |
| 285 } // namespace extensions | 284 } // namespace extensions |
| OLD | NEW |