Chromium Code Reviews| Index: athena/extensions/chrome/athena_app_delegate.h |
| diff --git a/extensions/shell/browser/shell_app_delegate.h b/athena/extensions/chrome/athena_app_delegate.h |
| similarity index 72% |
| copy from extensions/shell/browser/shell_app_delegate.h |
| copy to athena/extensions/chrome/athena_app_delegate.h |
| index 6e58e17fc835deb01e711fca793fd7ffd9c2e5bf..0c41a7bed583490e06fd383e45d6e8f325238827 100644 |
| --- a/extensions/shell/browser/shell_app_delegate.h |
| +++ b/athena/extensions/chrome/athena_app_delegate.h |
| @@ -2,20 +2,25 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ |
| -#define EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ |
| +#ifndef ATHENA_EXTENSIONS_CHROME_ATHENA_APP_DELEGATE_H_ |
| +#define ATHENA_EXTENSIONS_CHROME_ATHENA_APP_DELEGATE_H_ |
| +#include "base/callback.h" |
|
Jun Mukai
2014/09/10 00:07:11
base/callback_forward.h would be more preferable.
oshima
2014/09/10 00:47:50
This is necessary to have terminating_callback_ me
|
| +#include "base/memory/scoped_ptr.h" |
| #include "extensions/browser/app_window/app_delegate.h" |
| +#include "ui/base/window_open_disposition.h" |
| -namespace extensions { |
| +namespace athena { |
| -// app_shell's AppDelegate implementation. |
| -class ShellAppDelegate : public AppDelegate { |
| +class AthenaAppDelegate : public extensions::AppDelegate { |
| public: |
| - ShellAppDelegate(); |
| - virtual ~ShellAppDelegate(); |
| + AthenaAppDelegate(); |
| + virtual ~AthenaAppDelegate(); |
| - // AppDelegate overrides: |
| + private: |
| + class NewWindowContentsDelegate; |
| + |
| + // extensions::AppDelegate: |
| virtual void InitWebContents(content::WebContents* web_contents) OVERRIDE; |
| virtual void ResizeWebContents(content::WebContents* web_contents, |
| const gfx::Size& size) OVERRIDE; |
| @@ -39,7 +44,7 @@ class ShellAppDelegate : public AppDelegate { |
| content::WebContents* web_contents, |
| const content::MediaStreamRequest& request, |
| const content::MediaResponseCallback& callback, |
| - const Extension* extension) OVERRIDE; |
| + const extensions::Extension* extension) OVERRIDE; |
| virtual int PreferredIconSize() OVERRIDE; |
| virtual gfx::ImageSkia GetAppDefaultIcon() OVERRIDE; |
| virtual void SetWebContentsBlocked(content::WebContents* web_contents, |
| @@ -48,10 +53,12 @@ class ShellAppDelegate : public AppDelegate { |
| content::WebContents* web_contents) OVERRIDE; |
| virtual void SetTerminatingCallback(const base::Closure& callback) OVERRIDE; |
| - private: |
| - DISALLOW_COPY_AND_ASSIGN(ShellAppDelegate); |
| + scoped_ptr<NewWindowContentsDelegate> new_window_contents_delegate_; |
| + base::Closure terminating_callback_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AthenaAppDelegate); |
| }; |
| -} // namespace extensions |
| +} // namespace athena |
| -#endif // EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ |
| +#endif // ATHENA_EXTENSIONS_CHROME_ATHENA_APP_DELEGATE_H_ |