OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ |
7 | 7 |
8 #include "apps/app_delegate.h" | |
9 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "extensions/browser/app_window/app_delegate.h" |
10 #include "ui/base/window_open_disposition.h" | 10 #include "ui/base/window_open_disposition.h" |
11 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class BrowserContext; | 14 class BrowserContext; |
15 class WebContents; | 15 class WebContents; |
16 } | 16 } |
17 | 17 |
18 class ChromeAppDelegate : public apps::AppDelegate { | 18 class ChromeAppDelegate : public extensions::AppDelegate { |
19 public: | 19 public: |
20 ChromeAppDelegate(); | 20 ChromeAppDelegate(); |
21 virtual ~ChromeAppDelegate(); | 21 virtual ~ChromeAppDelegate(); |
22 | 22 |
23 static void DisableExternalOpenForTesting(); | 23 static void DisableExternalOpenForTesting(); |
24 | 24 |
25 private: | 25 private: |
26 class NewWindowContentsDelegate; | 26 class NewWindowContentsDelegate; |
27 | 27 |
28 // apps::AppDelegate: | 28 // extensions::AppDelegate: |
29 virtual void InitWebContents(content::WebContents* web_contents) OVERRIDE; | 29 virtual void InitWebContents(content::WebContents* web_contents) OVERRIDE; |
30 virtual content::WebContents* OpenURLFromTab( | 30 virtual content::WebContents* OpenURLFromTab( |
31 content::BrowserContext* context, | 31 content::BrowserContext* context, |
32 content::WebContents* source, | 32 content::WebContents* source, |
33 const content::OpenURLParams& params) OVERRIDE; | 33 const content::OpenURLParams& params) OVERRIDE; |
34 virtual void AddNewContents(content::BrowserContext* context, | 34 virtual void AddNewContents(content::BrowserContext* context, |
35 content::WebContents* new_contents, | 35 content::WebContents* new_contents, |
36 WindowOpenDisposition disposition, | 36 WindowOpenDisposition disposition, |
37 const gfx::Rect& initial_pos, | 37 const gfx::Rect& initial_pos, |
38 bool user_gesture, | 38 bool user_gesture, |
(...skipping 15 matching lines...) Expand all Loading... |
54 bool blocked) OVERRIDE; | 54 bool blocked) OVERRIDE; |
55 virtual bool IsWebContentsVisible( | 55 virtual bool IsWebContentsVisible( |
56 content::WebContents* web_contents) OVERRIDE; | 56 content::WebContents* web_contents) OVERRIDE; |
57 | 57 |
58 scoped_ptr<NewWindowContentsDelegate> new_window_contents_delegate_; | 58 scoped_ptr<NewWindowContentsDelegate> new_window_contents_delegate_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(ChromeAppDelegate); | 60 DISALLOW_COPY_AND_ASSIGN(ChromeAppDelegate); |
61 }; | 61 }; |
62 | 62 |
63 #endif // CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ | 63 #endif // CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ |
OLD | NEW |