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

Unified Diff: chrome/browser/guest_view/guest_view_base.cc

Issue 353013007: Implement <appview> skeleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@app_view_skeleton
Patch Set: Fixed PermissionsTest unit test Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/guest_view/app_view/app_view_guest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/guest_view/guest_view_base.cc
diff --git a/chrome/browser/guest_view/guest_view_base.cc b/chrome/browser/guest_view/guest_view_base.cc
index b4b2250db87fb4d178d403da11540321ff8c385f..2b335016103e3249da6db11bd06b7678623008e5 100644
--- a/chrome/browser/guest_view/guest_view_base.cc
+++ b/chrome/browser/guest_view/guest_view_base.cc
@@ -4,12 +4,15 @@
#include "chrome/browser/guest_view/guest_view_base.h"
+#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/guest_view/app_view/app_view_guest.h"
#include "chrome/browser/guest_view/guest_view_constants.h"
#include "chrome/browser/guest_view/guest_view_manager.h"
#include "chrome/browser/guest_view/web_view/web_view_guest.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/content_settings.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
@@ -124,8 +127,14 @@ GuestViewBase* GuestViewBase::Create(
content::BrowserContext* browser_context,
int guest_instance_id,
const std::string& view_type) {
- if (view_type == "webview") {
+ if (view_type == WebViewGuest::Type) {
return new WebViewGuest(browser_context, guest_instance_id);
+ } else if (view_type == AppViewGuest::Type) {
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAppView)) {
+ return NULL;
+ }
+ return new AppViewGuest(browser_context, guest_instance_id);
}
NOTREACHED();
return NULL;
« no previous file with comments | « chrome/browser/guest_view/app_view/app_view_guest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698