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

Unified Diff: extensions/browser/guest_view/worker_frame/worker_frame_guest.cc

Issue 820513002: Renamed WorkerFrame to SurfaceWorker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed tests Created 6 years 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
Index: extensions/browser/guest_view/worker_frame/worker_frame_guest.cc
diff --git a/extensions/browser/guest_view/worker_frame/worker_frame_guest.cc b/extensions/browser/guest_view/worker_frame/worker_frame_guest.cc
deleted file mode 100644
index a9bea9c862d6fe23237f248f52f7a3d1b975ef6b..0000000000000000000000000000000000000000
--- a/extensions/browser/guest_view/worker_frame/worker_frame_guest.cc
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "extensions/browser/guest_view/worker_frame/worker_frame_guest.h"
-
-#include "content/public/common/url_constants.h"
-#include "extensions/browser/guest_view/guest_view_manager.h"
-#include "extensions/browser/guest_view/worker_frame/worker_frame_constants.h"
-#include "extensions/strings/grit/extensions_strings.h"
-#include "ipc/ipc_message_macros.h"
-
-using content::RenderFrameHost;
-using content::WebContents;
-
-namespace extensions {
-
-// static.
-const char WorkerFrameGuest::Type[] = "workerframe";
-
-// static
-GuestViewBase* WorkerFrameGuest::Create(
- content::BrowserContext* browser_context,
- content::WebContents* owner_web_contents,
- int guest_instance_id) {
- return new WorkerFrameGuest(browser_context,
- owner_web_contents,
- guest_instance_id);
-}
-
-WorkerFrameGuest::WorkerFrameGuest(
- content::BrowserContext* browser_context,
- content::WebContents* owner_web_contents,
- int guest_instance_id)
- : GuestView<WorkerFrameGuest>(browser_context,
- owner_web_contents,
- guest_instance_id),
- weak_ptr_factory_(this) {
-}
-
-WorkerFrameGuest::~WorkerFrameGuest() {
-}
-
-bool WorkerFrameGuest::HandleContextMenu(
- const content::ContextMenuParams& params) {
- return false;
-}
-
-const char* WorkerFrameGuest::GetAPINamespace() const {
- return worker_frame::kEmbedderAPINamespace;
-}
-
-int WorkerFrameGuest::GetTaskPrefix() const {
- return IDS_EXTENSION_TASK_MANAGER_WORKER_FRAME_TAG_PREFIX;
-}
-
-void WorkerFrameGuest::CreateWebContents(
- const base::DictionaryValue& create_params,
- const WebContentsCreatedCallback& callback) {
- std::string url;
- if (!create_params.GetString(worker_frame::kURL, &url)) {
- callback.Run(NULL);
- return;
- }
-
- url_ = GURL(url);
- if (!url_.is_valid()) {
- callback.Run(NULL);
- return;
- }
-
- GURL guest_site(base::StringPrintf("%s://wtf-%s",
- content::kGuestScheme,
- GetOwnerSiteURL().host().c_str()));
-
- GuestViewManager* guest_view_manager =
- GuestViewManager::FromBrowserContext(
- owner_web_contents()->GetBrowserContext());
- content::SiteInstance* guest_site_instance =
- guest_view_manager->GetGuestSiteInstance(guest_site);
- WebContents::CreateParams params(
- owner_web_contents()->GetBrowserContext(),
- guest_site_instance);
- params.guest_delegate = this;
- callback.Run(WebContents::Create(params));
-}
-
-void WorkerFrameGuest::DidAttachToEmbedder() {
- web_contents()->GetController().LoadURL(
- url_, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
- url_ = GURL();
-}
-
-} // namespace extensions
« no previous file with comments | « extensions/browser/guest_view/worker_frame/worker_frame_guest.h ('k') | extensions/common/api/_api_features.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698