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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 params.referrer, | 196 params.referrer, |
197 params.frame_tree_node_id, | 197 params.frame_tree_node_id, |
198 NEW_FOREGROUND_TAB, | 198 NEW_FOREGROUND_TAB, |
199 params.transition, | 199 params.transition, |
200 params.is_renderer_initiated)); | 200 params.is_renderer_initiated)); |
201 } | 201 } |
202 return extension_options_guest_delegate_->OpenURLInNewTab(params); | 202 return extension_options_guest_delegate_->OpenURLInNewTab(params); |
203 } | 203 } |
204 | 204 |
205 void ExtensionOptionsGuest::CloseContents(content::WebContents* source) { | 205 void ExtensionOptionsGuest::CloseContents(content::WebContents* source) { |
206 DispatchEventToView(new GuestViewBase::Event( | 206 DispatchEventToView( |
207 extension_options_internal::OnClose::kEventName, | 207 new GuestViewBase::Event(extension_options_internal::OnClose::kEventName, |
208 make_scoped_ptr(new base::DictionaryValue()))); | 208 make_scoped_ptr(new base::DictionaryValue()))); |
209 } | 209 } |
210 | 210 |
211 bool ExtensionOptionsGuest::HandleContextMenu( | 211 bool ExtensionOptionsGuest::HandleContextMenu( |
212 const content::ContextMenuParams& params) { | 212 const content::ContextMenuParams& params) { |
213 if (!extension_options_guest_delegate_) | 213 if (!extension_options_guest_delegate_) |
214 return false; | 214 return false; |
215 | 215 |
216 return extension_options_guest_delegate_->HandleContextMenu(params); | 216 return extension_options_guest_delegate_->HandleContextMenu(params); |
217 } | 217 } |
218 | 218 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 return handled; | 262 return handled; |
263 } | 263 } |
264 | 264 |
265 void ExtensionOptionsGuest::OnRequest( | 265 void ExtensionOptionsGuest::OnRequest( |
266 const ExtensionHostMsg_Request_Params& params) { | 266 const ExtensionHostMsg_Request_Params& params) { |
267 extension_function_dispatcher_->Dispatch(params, | 267 extension_function_dispatcher_->Dispatch(params, |
268 web_contents()->GetRenderViewHost()); | 268 web_contents()->GetRenderViewHost()); |
269 } | 269 } |
270 | 270 |
271 } // namespace extensions | 271 } // namespace extensions |
OLD | NEW |