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

Unified Diff: apps/shell/browser/shell_shell_window_delegate.cc

Issue 171523005: BACKUP: NativeAppWindowView - before splitting CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « apps/shell/browser/shell_shell_window_delegate.h ('k') | apps/ui/views/native_app_window_views.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/shell/browser/shell_shell_window_delegate.cc
diff --git a/apps/shell/browser/shell_shell_window_delegate.cc b/apps/shell/browser/shell_shell_window_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4aa2270730698b9036582adcb4566afc3806d413
--- /dev/null
+++ b/apps/shell/browser/shell_shell_window_delegate.cc
@@ -0,0 +1,81 @@
+// 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 "apps/shell/browser/shell_shell_window_delegate.h"
+
+#include "apps/shell/browser/shell_native_app_window.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_view.h"
+#include "ui/aura/window.h"
+
+namespace apps {
+
+ShellShellWindowDelegate::ShellShellWindowDelegate() {}
+
+ShellShellWindowDelegate::~ShellShellWindowDelegate() {}
+
+void ShellShellWindowDelegate::InitWebContents(
+ content::WebContents* web_contents) {}
+
+NativeAppWindow* ShellShellWindowDelegate::CreateNativeAppWindow(
+ AppWindow* window,
+ const AppWindow::CreateParams& params) {
+ ShellNativeAppWindow* native_app_window = new ShellNativeAppWindow;
+ native_app_window->Init(window, params.bounds);
+ return native_app_window;
+}
+
+content::WebContents* ShellShellWindowDelegate::OpenURLFromTab(
+ content::BrowserContext* context,
+ content::WebContents* source,
+ const content::OpenURLParams& params) {
+ return NULL;
+}
+
+void ShellShellWindowDelegate::AddNewContents(
+ content::BrowserContext* context,
+ content::WebContents* new_contents,
+ WindowOpenDisposition disposition,
+ const gfx::Rect& initial_pos,
+ bool user_gesture,
+ bool* was_blocked) {
+ // Opening a new tab/window is not supported.
+}
+
+content::ColorChooser* ShellShellWindowDelegate::ShowColorChooser(
+ content::WebContents* web_contents,
+ SkColor initial_color) {
+ return NULL;
+}
+
+void ShellShellWindowDelegate::RunFileChooser(
+ content::WebContents* tab,
+ const content::FileChooserParams& params) {
+ // No file pickers in app_shell.
+}
+
+void ShellShellWindowDelegate::RequestMediaAccessPermission(
+ content::WebContents* web_contents,
+ const content::MediaStreamRequest& request,
+ const content::MediaResponseCallback& callback,
+ const extensions::Extension* extension) {
+ // TODO(jamescook): Support media capture.
+}
+
+int ShellShellWindowDelegate::PreferredIconSize() {
+ // Pick an arbitrary size.
+ return 32;
+}
+
+void ShellShellWindowDelegate::SetWebContentsBlocked(
+ content::WebContents* web_contents,
+ bool blocked) {}
+
+bool ShellShellWindowDelegate::IsWebContentsVisible(
+ content::WebContents* web_contents) {
+ aura::Window* native_window = web_contents->GetView()->GetNativeView();
+ return native_window->IsVisible();
+}
+
+} // namespace apps
« no previous file with comments | « apps/shell/browser/shell_shell_window_delegate.h ('k') | apps/ui/views/native_app_window_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698