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

Unified Diff: extensions/shell/browser/shell_app_window.cc

Issue 571643003: Remove app_shell chrome.shell API and ShellAppWindow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (remove-shell) rebase 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/shell/browser/shell_app_window.h ('k') | extensions/shell/browser/shell_desktop_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/shell/browser/shell_app_window.cc
diff --git a/extensions/shell/browser/shell_app_window.cc b/extensions/shell/browser/shell_app_window.cc
deleted file mode 100644
index 165dd5ce9a8ffab02f69004b54dfe116b9bbad03..0000000000000000000000000000000000000000
--- a/extensions/shell/browser/shell_app_window.cc
+++ /dev/null
@@ -1,91 +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/shell/browser/shell_app_window.h"
-
-#include "content/public/browser/navigation_controller.h"
-#include "content/public/browser/render_view_host.h"
-#include "content/public/browser/web_contents.h"
-#include "extensions/browser/view_type_utils.h"
-#include "extensions/common/extension_messages.h"
-#include "extensions/shell/browser/media_capture_util.h"
-#include "extensions/shell/browser/shell_extension_web_contents_observer.h"
-#include "ipc/ipc_message_macros.h"
-
-using content::BrowserContext;
-using content::WebContents;
-
-namespace extensions {
-
-ShellAppWindow::ShellAppWindow() : extension_(NULL) {
-}
-
-ShellAppWindow::~ShellAppWindow() {
-}
-
-void ShellAppWindow::Init(BrowserContext* context,
- const Extension* extension,
- gfx::Size initial_size) {
- DCHECK(extension);
- DCHECK(context);
- extension_ = extension;
- extension_function_dispatcher_.reset(
- new ExtensionFunctionDispatcher(context, this));
-
- // Create the web contents with an initial size to avoid a resize.
- WebContents::CreateParams create_params(context);
- create_params.initial_size = initial_size;
- web_contents_.reset(WebContents::Create(create_params));
-
- content::WebContentsObserver::Observe(web_contents_.get());
- web_contents_->SetDelegate(this);
-
- // Add support for extension startup.
- ShellExtensionWebContentsObserver::CreateForWebContents(web_contents_.get());
-
- SetViewType(web_contents_.get(), VIEW_TYPE_APP_WINDOW);
-}
-
-void ShellAppWindow::LoadURL(const GURL& url) {
- content::NavigationController::LoadURLParams params(url);
- web_contents_->GetController().LoadURLWithParams(params);
- web_contents_->Focus();
-}
-
-aura::Window* ShellAppWindow::GetNativeWindow() {
- return web_contents_->GetNativeView();
-}
-
-int ShellAppWindow::GetRenderViewRoutingID() {
- return web_contents_->GetRenderViewHost()->GetRoutingID();
-}
-
-void ShellAppWindow::RequestMediaAccessPermission(
- content::WebContents* web_contents,
- const content::MediaStreamRequest& request,
- const content::MediaResponseCallback& callback) {
- // Allow access to the microphone and/or camera.
- media_capture_util::GrantMediaStreamRequest(
- web_contents, request, callback, extension_);
-}
-
-bool ShellAppWindow::OnMessageReceived(const IPC::Message& message) {
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(ShellAppWindow, message)
- IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
- return handled;
-}
-
-content::WebContents* ShellAppWindow::GetAssociatedWebContents() const {
- return web_contents_.get();
-}
-
-void ShellAppWindow::OnRequest(const ExtensionHostMsg_Request_Params& params) {
- extension_function_dispatcher_->Dispatch(params,
- web_contents_->GetRenderViewHost());
-}
-
-} // namespace extensions
« no previous file with comments | « extensions/shell/browser/shell_app_window.h ('k') | extensions/shell/browser/shell_desktop_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698