| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 int min_width = 0; | 171 int min_width = 0; |
| 172 extra_params()->GetInteger(extensionoptions::kAttributeMinHeight, | 172 extra_params()->GetInteger(extensionoptions::kAttributeMinHeight, |
| 173 &min_height); | 173 &min_height); |
| 174 extra_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); | 174 extra_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); |
| 175 | 175 |
| 176 // Call SetAutoSize to apply all the appropriate validation and clipping of | 176 // Call SetAutoSize to apply all the appropriate validation and clipping of |
| 177 // values. | 177 // values. |
| 178 SetAutoSize( | 178 SetAutoSize( |
| 179 true, gfx::Size(min_width, min_height), gfx::Size(max_width, max_height)); | 179 true, gfx::Size(min_width, min_height), gfx::Size(max_width, max_height)); |
| 180 } | 180 } |
| 181 |
| 182 void ExtensionOptionsGuest::CloseContents(content::WebContents* source) { |
| 183 DispatchEventToEmbedder(new extensions::GuestViewBase::Event( |
| 184 extension_options_internal::OnClose::kEventName, |
| 185 make_scoped_ptr(new base::DictionaryValue()))); |
| 186 } |
| OLD | NEW |