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 "chrome/browser/guest_view/extension_options/extension_options_guest.h" | 5 #include "chrome/browser/guest_view/extension_options/extension_options_guest.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" | 8 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
9 #include "chrome/browser/guest_view/extension_options/extension_options_constant s.h" | 9 #include "chrome/browser/guest_view/extension_options/extension_options_constant s.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 IPC_MESSAGE_UNHANDLED(handled = false) | 131 IPC_MESSAGE_UNHANDLED(handled = false) |
132 IPC_END_MESSAGE_MAP() | 132 IPC_END_MESSAGE_MAP() |
133 return handled; | 133 return handled; |
134 } | 134 } |
135 | 135 |
136 void ExtensionOptionsGuest::OnRequest( | 136 void ExtensionOptionsGuest::OnRequest( |
137 const ExtensionHostMsg_Request_Params& params) { | 137 const ExtensionHostMsg_Request_Params& params) { |
138 extension_function_dispatcher_->Dispatch( | 138 extension_function_dispatcher_->Dispatch( |
139 params, guest_web_contents()->GetRenderViewHost()); | 139 params, guest_web_contents()->GetRenderViewHost()); |
140 } | 140 } |
141 | |
142 void ExtensionOptionsGuest::SizeChanged(const gfx::Size& old_size, | |
143 const gfx::Size& new_size) { | |
not at google - send to devlin
2014/07/30 17:44:56
indentation
ericzeng
2014/07/30 23:29:26
Done.
| |
144 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | |
145 args->SetInteger(extensionoptions::kWidth, new_size.width()); | |
146 args->SetInteger(extensionoptions::kHeight, new_size.height()); | |
not at google - send to devlin
2014/07/30 17:44:57
better:
OnSizeChanged event;
event.width = new_si
ericzeng
2014/07/30 23:29:26
GuestViewBase would need some refactoring in order
| |
147 DispatchEventToEmbedder(new GuestViewBase::Event( | |
148 extensions::api::extension_options_internal::OnSizeChanged::kEventName, | |
not at google - send to devlin
2014/07/30 17:44:56
you might want to "using extensions::api::extensio
ericzeng
2014/07/30 23:29:25
Done.
| |
149 args.Pass())); | |
150 } | |
OLD | NEW |