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

Side by Side Diff: extensions/browser/guest_view/guest_view_base.cc

Issue 376033002: Adding MimeHandlerView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pending-zork-patch2
Patch Set: add (c) header 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/guest_view_base.h" 5 #include "extensions/browser/guest_view/guest_view_base.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/public/browser/render_frame_host.h" 9 #include "content/public/browser/render_frame_host.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 CHECK(embedder_web_contents); 125 CHECK(embedder_web_contents);
126 int embedder_process_id = 126 int embedder_process_id =
127 embedder_web_contents->GetRenderProcessHost()->GetID(); 127 embedder_web_contents->GetRenderProcessHost()->GetID();
128 128
129 Feature::Availability availability = feature->IsAvailableToContext( 129 Feature::Availability availability = feature->IsAvailableToContext(
130 embedder_extension, 130 embedder_extension,
131 process_map->GetMostLikelyContextType(embedder_extension, 131 process_map->GetMostLikelyContextType(embedder_extension,
132 embedder_process_id), 132 embedder_process_id),
133 embedder_web_contents->GetLastCommittedURL()); 133 embedder_web_contents->GetLastCommittedURL());
134 if (!availability.is_available()) { 134 if (!availability.is_available()) {
135 callback.Run(NULL); 135 // TODO(lazyboy): Fix api feature stuff.
136 return; 136 //callback.Run(NULL);
Fady Samuel 2014/09/02 15:08:25 This commenting out should be unnecessary if you c
lazyboy 2014/09/02 20:17:22 Done.
137 //return;
137 } 138 }
138 139
139 CreateWebContents(embedder_extension_id, 140 CreateWebContents(embedder_extension_id,
140 embedder_process_id, 141 embedder_process_id,
141 create_params, 142 create_params,
142 base::Bind(&GuestViewBase::CompleteInit, 143 base::Bind(&GuestViewBase::CompleteInit,
143 AsWeakPtr(), 144 AsWeakPtr(),
144 embedder_extension_id, 145 embedder_extension_id,
145 embedder_process_id, 146 embedder_process_id,
146 callback)); 147 callback));
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 } 444 }
444 445
445 // static 446 // static
446 void GuestViewBase::RegisterGuestViewTypes() { 447 void GuestViewBase::RegisterGuestViewTypes() {
447 AppViewGuest::Register(); 448 AppViewGuest::Register();
448 WebViewGuest::Register(); 449 WebViewGuest::Register();
449 ExtensionsAPIClient::Get()->RegisterGuestViewTypes(); 450 ExtensionsAPIClient::Get()->RegisterGuestViewTypes();
450 } 451 }
451 452
452 } // namespace extensions 453 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698