Added ConsumerManagementService class to handle enroll state and device owner info...
[chromium-blink-merge.git] / apps / app_delegate.h
blob72ae2cf757f8dd336793cac173ff4287e310c0f1
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.
5 #ifndef APPS_APP_DELEGATE_H_
6 #define APPS_APP_DELEGATE_H_
8 #include "content/public/common/media_stream_request.h"
9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/base/window_open_disposition.h"
12 namespace content {
13 class BrowserContext;
14 class ColorChooser;
15 struct FileChooserParams;
16 struct OpenURLParams;
17 class WebContents;
20 namespace extensions {
21 class Extension;
24 namespace gfx {
25 class Rect;
28 namespace apps {
30 // Interface to give packaged apps access to services in the browser, for things
31 // like handling links and showing UI prompts to the user.
32 class AppDelegate {
33 public:
34 virtual ~AppDelegate() {}
36 // General initialization.
37 virtual void InitWebContents(content::WebContents* web_contents) = 0;
39 // Link handling.
40 virtual content::WebContents* OpenURLFromTab(
41 content::BrowserContext* context,
42 content::WebContents* source,
43 const content::OpenURLParams& params) = 0;
44 virtual void AddNewContents(content::BrowserContext* context,
45 content::WebContents* new_contents,
46 WindowOpenDisposition disposition,
47 const gfx::Rect& initial_pos,
48 bool user_gesture,
49 bool* was_blocked) = 0;
51 // Feature support.
52 virtual content::ColorChooser* ShowColorChooser(
53 content::WebContents* web_contents,
54 SkColor initial_color) = 0;
55 virtual void RunFileChooser(content::WebContents* tab,
56 const content::FileChooserParams& params) = 0;
57 virtual void RequestMediaAccessPermission(
58 content::WebContents* web_contents,
59 const content::MediaStreamRequest& request,
60 const content::MediaResponseCallback& callback,
61 const extensions::Extension* extension) = 0;
62 virtual int PreferredIconSize() = 0;
64 // Web contents modal dialog support.
65 virtual void SetWebContentsBlocked(content::WebContents* web_contents,
66 bool blocked) = 0;
67 virtual bool IsWebContentsVisible(content::WebContents* web_contents) = 0;
70 } // namespace apps
72 #endif // APPS_APP_DELEGATE_H_