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

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

Issue 564993002: Embedded Extension Options: remove flags and trunk channel restrictions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 ->CreateExtensionOptionsGuestDelegate(this)) { 43 ->CreateExtensionOptionsGuestDelegate(this)) {
44 } 44 }
45 45
46 ExtensionOptionsGuest::~ExtensionOptionsGuest() { 46 ExtensionOptionsGuest::~ExtensionOptionsGuest() {
47 } 47 }
48 48
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 if (!extensions::FeatureSwitch::embedded_extension_options()->IsEnabled()) {
54 return NULL;
55 }
56 return new ExtensionOptionsGuest(browser_context, guest_instance_id); 53 return new ExtensionOptionsGuest(browser_context, guest_instance_id);
57 } 54 }
58 55
59 void ExtensionOptionsGuest::CreateWebContents( 56 void ExtensionOptionsGuest::CreateWebContents(
60 const std::string& embedder_extension_id, 57 const std::string& embedder_extension_id,
61 int embedder_render_process_id, 58 int embedder_render_process_id,
62 const base::DictionaryValue& create_params, 59 const base::DictionaryValue& create_params,
63 const WebContentsCreatedCallback& callback) { 60 const WebContentsCreatedCallback& callback) {
64 // Get the extension's base URL. 61 // Get the extension's base URL.
65 std::string extension_id; 62 std::string extension_id;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 attach_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); 248 attach_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width);
252 249
253 // Call SetAutoSize to apply all the appropriate validation and clipping of 250 // Call SetAutoSize to apply all the appropriate validation and clipping of
254 // values. 251 // values.
255 SetAutoSize(auto_size_enabled, 252 SetAutoSize(auto_size_enabled,
256 gfx::Size(min_width, min_height), 253 gfx::Size(min_width, min_height),
257 gfx::Size(max_width, max_height)); 254 gfx::Size(max_width, max_height));
258 } 255 }
259 256
260 } // namespace extensions 257 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/extension_options/extension_options_apitest.cc ('k') | extensions/common/feature_switch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698