| 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 EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ | 5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ |
| 6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ | 6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "content/public/common/media_stream_request.h" | 9 #include "content/public/common/media_stream_request.h" |
| 10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 // Interface to give packaged apps access to services in the browser, for things | 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. | 31 // like handling links and showing UI prompts to the user. |
| 32 class AppDelegate { | 32 class AppDelegate { |
| 33 public: | 33 public: |
| 34 virtual ~AppDelegate() {} | 34 virtual ~AppDelegate() {} |
| 35 | 35 |
| 36 // General initialization. | 36 // General initialization. |
| 37 virtual void InitWebContents(content::WebContents* web_contents) = 0; | 37 virtual void InitWebContents(content::WebContents* web_contents) = 0; |
| 38 | 38 |
| 39 // Resizes WebContents. |
| 40 virtual void ResizeWebContents(content::WebContents* web_contents, |
| 41 const gfx::Size& size) = 0; |
| 42 |
| 39 // Link handling. | 43 // Link handling. |
| 40 virtual content::WebContents* OpenURLFromTab( | 44 virtual content::WebContents* OpenURLFromTab( |
| 41 content::BrowserContext* context, | 45 content::BrowserContext* context, |
| 42 content::WebContents* source, | 46 content::WebContents* source, |
| 43 const content::OpenURLParams& params) = 0; | 47 const content::OpenURLParams& params) = 0; |
| 44 virtual void AddNewContents(content::BrowserContext* context, | 48 virtual void AddNewContents(content::BrowserContext* context, |
| 45 content::WebContents* new_contents, | 49 content::WebContents* new_contents, |
| 46 WindowOpenDisposition disposition, | 50 WindowOpenDisposition disposition, |
| 47 const gfx::Rect& initial_pos, | 51 const gfx::Rect& initial_pos, |
| 48 bool user_gesture, | 52 bool user_gesture, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 67 bool blocked) = 0; | 71 bool blocked) = 0; |
| 68 virtual bool IsWebContentsVisible(content::WebContents* web_contents) = 0; | 72 virtual bool IsWebContentsVisible(content::WebContents* web_contents) = 0; |
| 69 | 73 |
| 70 // |callback| will be called when the process is about to terminate. | 74 // |callback| will be called when the process is about to terminate. |
| 71 virtual void SetTerminatingCallback(const base::Closure& callback) = 0; | 75 virtual void SetTerminatingCallback(const base::Closure& callback) = 0; |
| 72 }; | 76 }; |
| 73 | 77 |
| 74 } // namespace extensions | 78 } // namespace extensions |
| 75 | 79 |
| 76 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ | 80 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ |
| OLD | NEW |