| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 new extensions::ExtensionFunctionDispatcher(browser_context(), this)); | 118 new extensions::ExtensionFunctionDispatcher(browser_context(), this)); |
| 119 if (extension_options_guest_delegate_) { | 119 if (extension_options_guest_delegate_) { |
| 120 extension_options_guest_delegate_->DidInitialize(); | 120 extension_options_guest_delegate_->DidInitialize(); |
| 121 } | 121 } |
| 122 web_contents()->GetController().LoadURL(options_page_, | 122 web_contents()->GetController().LoadURL(options_page_, |
| 123 content::Referrer(), | 123 content::Referrer(), |
| 124 ui::PAGE_TRANSITION_LINK, | 124 ui::PAGE_TRANSITION_LINK, |
| 125 std::string()); | 125 std::string()); |
| 126 } | 126 } |
| 127 | 127 |
| 128 void ExtensionOptionsGuest::DidStopLoading() { | 128 void ExtensionOptionsGuest::GuestViewDidStopLoading() { |
| 129 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 129 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
| 130 DispatchEventToView(new GuestViewBase::Event( | 130 DispatchEventToView(new GuestViewBase::Event( |
| 131 extension_options_internal::OnLoad::kEventName, args.Pass())); | 131 extension_options_internal::OnLoad::kEventName, args.Pass())); |
| 132 } | 132 } |
| 133 | 133 |
| 134 const char* ExtensionOptionsGuest::GetAPINamespace() const { | 134 const char* ExtensionOptionsGuest::GetAPINamespace() const { |
| 135 return extensionoptions::kAPINamespace; | 135 return extensionoptions::kAPINamespace; |
| 136 } | 136 } |
| 137 | 137 |
| 138 int ExtensionOptionsGuest::GetTaskPrefix() const { | 138 int ExtensionOptionsGuest::GetTaskPrefix() const { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 return handled; | 239 return handled; |
| 240 } | 240 } |
| 241 | 241 |
| 242 void ExtensionOptionsGuest::OnRequest( | 242 void ExtensionOptionsGuest::OnRequest( |
| 243 const ExtensionHostMsg_Request_Params& params) { | 243 const ExtensionHostMsg_Request_Params& params) { |
| 244 extension_function_dispatcher_->Dispatch(params, | 244 extension_function_dispatcher_->Dispatch(params, |
| 245 web_contents()->GetRenderViewHost()); | 245 web_contents()->GetRenderViewHost()); |
| 246 } | 246 } |
| 247 | 247 |
| 248 } // namespace extensions | 248 } // namespace extensions |
| OLD | NEW |