OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SHELL_WINDOW_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_APPS_CHROME_SHELL_WINDOW_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_APPS_CHROME_SHELL_WINDOW_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_APPS_CHROME_SHELL_WINDOW_DELEGATE_H_ |
7 | 7 |
8 #include "apps/shell_window.h" | 8 #include "apps/shell_window.h" |
9 #include "base/memory/scoped_ptr.h" | |
9 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
10 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
11 #include "content/public/browser/web_contents_delegate.h" | 12 #include "content/public/browser/web_contents_delegate.h" |
12 #include "ui/base/window_open_disposition.h" | 13 #include "ui/base/window_open_disposition.h" |
13 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
14 | 15 |
15 namespace chrome { | 16 namespace chrome { |
16 | 17 |
18 class ShellWindowLinkDelegate : public content::WebContentsDelegate { | |
sky
2013/07/08 14:51:39
And virtual destructor.
zhchbin
2013/07/09 02:00:10
Done.
| |
19 public: | |
20 ShellWindowLinkDelegate(); | |
21 | |
22 private: | |
23 virtual content::WebContents* OpenURLFromTab( | |
24 content::WebContents* source, | |
25 const content::OpenURLParams& params) OVERRIDE; | |
26 | |
27 DISALLOW_COPY_AND_ASSIGN(ShellWindowLinkDelegate); | |
28 }; | |
29 | |
17 class ChromeShellWindowDelegate : public apps::ShellWindow::Delegate { | 30 class ChromeShellWindowDelegate : public apps::ShellWindow::Delegate { |
18 public: | 31 public: |
19 ChromeShellWindowDelegate(); | 32 ChromeShellWindowDelegate(); |
20 virtual ~ChromeShellWindowDelegate(); | 33 virtual ~ChromeShellWindowDelegate(); |
21 | 34 |
22 static void DisableExternalOpenForTesting(); | 35 static void DisableExternalOpenForTesting(); |
23 | 36 |
24 private: | 37 private: |
25 // apps::ShellWindow::Delegate: | 38 // apps::ShellWindow::Delegate: |
26 virtual void InitWebContents(content::WebContents* web_contents) OVERRIDE; | 39 virtual void InitWebContents(content::WebContents* web_contents) OVERRIDE; |
(...skipping 17 matching lines...) Expand all Loading... | |
44 content::WebContents* web_contents, | 57 content::WebContents* web_contents, |
45 const content::MediaStreamRequest& request, | 58 const content::MediaStreamRequest& request, |
46 const content::MediaResponseCallback& callback, | 59 const content::MediaResponseCallback& callback, |
47 const extensions::Extension* extension) OVERRIDE; | 60 const extensions::Extension* extension) OVERRIDE; |
48 virtual int PreferredIconSize() OVERRIDE; | 61 virtual int PreferredIconSize() OVERRIDE; |
49 virtual void SetWebContentsBlocked(content::WebContents* web_contents, | 62 virtual void SetWebContentsBlocked(content::WebContents* web_contents, |
50 bool blocked) OVERRIDE; | 63 bool blocked) OVERRIDE; |
51 virtual bool IsWebContentsVisible( | 64 virtual bool IsWebContentsVisible( |
52 content::WebContents* web_contents) OVERRIDE; | 65 content::WebContents* web_contents) OVERRIDE; |
53 | 66 |
67 scoped_ptr<ShellWindowLinkDelegate> shell_window_link_delegate_; | |
68 | |
54 DISALLOW_COPY_AND_ASSIGN(ChromeShellWindowDelegate); | 69 DISALLOW_COPY_AND_ASSIGN(ChromeShellWindowDelegate); |
55 }; | 70 }; |
56 | 71 |
57 } // namespace chrome | 72 } // namespace chrome |
58 | 73 |
59 #endif // CHROME_BROWSER_UI_APPS_CHROME_SHELL_WINDOW_DELEGATE_H_ | 74 #endif // CHROME_BROWSER_UI_APPS_CHROME_SHELL_WINDOW_DELEGATE_H_ |
OLD | NEW |