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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 int min_width = 0; | 170 int min_width = 0; |
171 extra_params()->GetInteger(extensionoptions::kAttributeMinHeight, | 171 extra_params()->GetInteger(extensionoptions::kAttributeMinHeight, |
172 &min_height); | 172 &min_height); |
173 extra_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); | 173 extra_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); |
174 | 174 |
175 // Call SetAutoSize to apply all the appropriate validation and clipping of | 175 // Call SetAutoSize to apply all the appropriate validation and clipping of |
176 // values. | 176 // values. |
177 SetAutoSize( | 177 SetAutoSize( |
178 true, gfx::Size(min_width, min_height), gfx::Size(max_width, max_height)); | 178 true, gfx::Size(min_width, min_height), gfx::Size(max_width, max_height)); |
179 } | 179 } |
180 | |
181 void ExtensionOptionsGuest::CloseContents(content::WebContents* source) { | |
182 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | |
183 DispatchEventToEmbedder(new extensions::GuestViewBase::Event( | |
184 extension_options_internal::OnClose::kEventName, args.Pass())); | |
not at google - send to devlin
2014/08/20 02:16:37
Inline |args|? You can do
make_scoped_ptr(new bas
ericzeng
2014/08/20 17:26:00
Done.
| |
185 } | |
OLD | NEW |