Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: extensions/browser/guest_view/extension_options/extension_options_guest.cc

Issue 572633003: Enable webview tag in webui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix object-src Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/values.h" 7 #include "base/values.h"
8 #include "components/crx_file/id_util.h" 8 #include "components/crx_file/id_util.h"
9 #include "content/public/browser/render_process_host.h" 9 #include "content/public/browser/render_process_host.h"
10 #include "content/public/browser/site_instance.h" 10 #include "content/public/browser/site_instance.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // static 49 // static
50 extensions::GuestViewBase* ExtensionOptionsGuest::Create( 50 extensions::GuestViewBase* ExtensionOptionsGuest::Create(
51 content::BrowserContext* browser_context, 51 content::BrowserContext* browser_context,
52 int guest_instance_id) { 52 int guest_instance_id) {
53 return new ExtensionOptionsGuest(browser_context, guest_instance_id); 53 return new ExtensionOptionsGuest(browser_context, guest_instance_id);
54 } 54 }
55 55
56 void ExtensionOptionsGuest::CreateWebContents( 56 void ExtensionOptionsGuest::CreateWebContents(
57 const std::string& embedder_extension_id, 57 const std::string& embedder_extension_id,
58 int embedder_render_process_id, 58 int embedder_render_process_id,
59 const GURL& embedder_site_url,
59 const base::DictionaryValue& create_params, 60 const base::DictionaryValue& create_params,
60 const WebContentsCreatedCallback& callback) { 61 const WebContentsCreatedCallback& callback) {
61 // Get the extension's base URL. 62 // Get the extension's base URL.
62 std::string extension_id; 63 std::string extension_id;
63 create_params.GetString(extensionoptions::kExtensionId, &extension_id); 64 create_params.GetString(extensionoptions::kExtensionId, &extension_id);
64 65
65 if (!crx_file::id_util::IdIsValid(extension_id)) { 66 if (!crx_file::id_util::IdIsValid(extension_id)) {
66 callback.Run(NULL); 67 callback.Run(NULL);
67 return; 68 return;
68 } 69 }
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 attach_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); 249 attach_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width);
249 250
250 // Call SetAutoSize to apply all the appropriate validation and clipping of 251 // Call SetAutoSize to apply all the appropriate validation and clipping of
251 // values. 252 // values.
252 SetAutoSize(auto_size_enabled, 253 SetAutoSize(auto_size_enabled,
253 gfx::Size(min_width, min_height), 254 gfx::Size(min_width, min_height),
254 gfx::Size(max_width, max_height)); 255 gfx::Size(max_width, max_height));
255 } 256 }
256 257
257 } // namespace extensions 258 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698