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

Unified Diff: chrome/browser/guest_view/app_view/app_view_guest.h

Issue 486903002: Moving app_view to extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
Index: chrome/browser/guest_view/app_view/app_view_guest.h
diff --git a/chrome/browser/guest_view/app_view/app_view_guest.h b/chrome/browser/guest_view/app_view/app_view_guest.h
deleted file mode 100644
index ef490814e8f4ff5b03402f6acfefa055eed27a04..0000000000000000000000000000000000000000
--- a/chrome/browser/guest_view/app_view/app_view_guest.h
+++ /dev/null
@@ -1,86 +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.
-
-#ifndef CHROME_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_H_
-#define CHROME_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_H_
-
-#include "base/id_map.h"
-#include "extensions/browser/extension_function_dispatcher.h"
-#include "extensions/browser/guest_view/guest_view.h"
-
-namespace extensions {
-class Extension;
-class ExtensionHost;
-
-// An AppViewGuest provides the browser-side implementation of <appview> API.
-// AppViewGuest is created on attachment. That is, when a guest WebContents is
-// associated with a particular embedder WebContents. This happens on calls to
-// the connect API.
-class AppViewGuest : public GuestView<AppViewGuest>,
- public ExtensionFunctionDispatcher::Delegate {
- public:
- static const char Type[];
-
- // Completes the creation of a WebContents associated with the provided
- // |guest_extensions_id|.
- static bool CompletePendingRequest(
- content::BrowserContext* browser_context,
- const GURL& url,
- int guest_instance_id,
- const std::string& guest_extension_id);
-
- static GuestViewBase* Create(content::BrowserContext* browser_context,
- int guest_instance_id);
-
- // ExtensionFunctionDispatcher::Delegate implementation.
- virtual WindowController* GetExtensionWindowController() const OVERRIDE;
- virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE;
-
- // content::WebContentsObserver implementation.
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
-
- // content::WebContentsDelegate implementation.
- virtual bool HandleContextMenu(
- const content::ContextMenuParams& params) OVERRIDE;
-
- // GuestViewBase implementation.
- virtual const char* GetAPINamespace() OVERRIDE;
- virtual void CreateWebContents(
- const std::string& embedder_extension_id,
- int embedder_render_process_id,
- const base::DictionaryValue& create_params,
- const WebContentsCreatedCallback& callback) OVERRIDE;
- virtual void DidAttachToEmbedder() OVERRIDE;
- virtual void DidInitialize() OVERRIDE;
-
- private:
- AppViewGuest(content::BrowserContext* browser_context,
- int guest_instance_id);
-
- virtual ~AppViewGuest();
-
- void OnRequest(const ExtensionHostMsg_Request_Params& params);
-
- void CompleteCreateWebContents(const GURL& url,
- const Extension* guest_extension,
- const WebContentsCreatedCallback& callback);
-
- void LaunchAppAndFireEvent(scoped_ptr<base::DictionaryValue> data,
- const WebContentsCreatedCallback& callback,
- ExtensionHost* extension_host);
-
- GURL url_;
- std::string guest_extension_id_;
- scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_;
-
- // This is used to ensure pending tasks will not fire after this object is
- // destroyed.
- base::WeakPtrFactory<AppViewGuest> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(AppViewGuest);
-};
-
-} // namespace extensions
-
-#endif // CHROME_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_H_
« no previous file with comments | « chrome/browser/guest_view/app_view/app_view_constants.cc ('k') | chrome/browser/guest_view/app_view/app_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698