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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "apps/shell/browser/shell_shell_window_delegate.h"
6
7 #include "apps/shell/browser/shell_native_app_window.h"
8 #include "content/public/browser/web_contents.h"
9 #include "content/public/browser/web_contents_view.h"
10 #include "ui/aura/window.h"
11
12 namespace apps {
13
14 ShellShellWindowDelegate::ShellShellWindowDelegate() {}
15
16 ShellShellWindowDelegate::~ShellShellWindowDelegate() {}
17
18 void ShellShellWindowDelegate::InitWebContents(
19 content::WebContents* web_contents) {}
20
21 NativeAppWindow* ShellShellWindowDelegate::CreateNativeAppWindow(
22 AppWindow* window,
23 const AppWindow::CreateParams& params) {
24 ShellNativeAppWindow* native_app_window = new ShellNativeAppWindow;
25 native_app_window->Init(window, params.bounds);
26 return native_app_window;
27 }
28
29 content::WebContents* ShellShellWindowDelegate::OpenURLFromTab(
30 content::BrowserContext* context,
31 content::WebContents* source,
32 const content::OpenURLParams& params) {
33 return NULL;
34 }
35
36 void ShellShellWindowDelegate::AddNewContents(
37 content::BrowserContext* context,
38 content::WebContents* new_contents,
39 WindowOpenDisposition disposition,
40 const gfx::Rect& initial_pos,
41 bool user_gesture,
42 bool* was_blocked) {
43 // Opening a new tab/window is not supported.
44 }
45
46 content::ColorChooser* ShellShellWindowDelegate::ShowColorChooser(
47 content::WebContents* web_contents,
48 SkColor initial_color) {
49 return NULL;
50 }
51
52 void ShellShellWindowDelegate::RunFileChooser(
53 content::WebContents* tab,
54 const content::FileChooserParams& params) {
55 // No file pickers in app_shell.
56 }
57
58 void ShellShellWindowDelegate::RequestMediaAccessPermission(
59 content::WebContents* web_contents,
60 const content::MediaStreamRequest& request,
61 const content::MediaResponseCallback& callback,
62 const extensions::Extension* extension) {
63 // TODO(jamescook): Support media capture.
64 }
65
66 int ShellShellWindowDelegate::PreferredIconSize() {
67 // Pick an arbitrary size.
68 return 32;
69 }
70
71 void ShellShellWindowDelegate::SetWebContentsBlocked(
72 content::WebContents* web_contents,
73 bool blocked) {}
74
75 bool ShellShellWindowDelegate::IsWebContentsVisible(
76 content::WebContents* web_contents) {
77 aura::Window* native_window = web_contents->GetView()->GetNativeView();
78 return native_window->IsVisible();
79 }
80
81 } // namespace apps
OLDNEW
« 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