Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: chrome/browser/ui/apps/chrome_shell_window_delegate.h

Issue 18051015: Use scoped_ptr for ShellWindowLinkDelegate to prevent memory leak. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add virtual destructor. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/apps/chrome_shell_window_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/apps/chrome_shell_window_delegate.h
diff --git a/chrome/browser/ui/apps/chrome_shell_window_delegate.h b/chrome/browser/ui/apps/chrome_shell_window_delegate.h
index 4bad8b2c85f9376e3bba5131a13041e2a379e3e4..a0e971dc028fda481a0a9e29ee75517124096a96 100644
--- a/chrome/browser/ui/apps/chrome_shell_window_delegate.h
+++ b/chrome/browser/ui/apps/chrome_shell_window_delegate.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_APPS_CHROME_SHELL_WINDOW_DELEGATE_H_
#include "apps/shell_window.h"
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
@@ -14,6 +15,19 @@
namespace chrome {
+class ShellWindowLinkDelegate : public content::WebContentsDelegate {
+ public:
+ ShellWindowLinkDelegate();
+ virtual ~ShellWindowLinkDelegate();
+
+ private:
+ virtual content::WebContents* OpenURLFromTab(
+ content::WebContents* source,
+ const content::OpenURLParams& params) OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(ShellWindowLinkDelegate);
+};
+
class ChromeShellWindowDelegate : public apps::ShellWindow::Delegate {
public:
ChromeShellWindowDelegate();
@@ -51,6 +65,8 @@ class ChromeShellWindowDelegate : public apps::ShellWindow::Delegate {
virtual bool IsWebContentsVisible(
content::WebContents* web_contents) OVERRIDE;
+ scoped_ptr<ShellWindowLinkDelegate> shell_window_link_delegate_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeShellWindowDelegate);
};
« no previous file with comments | « no previous file | chrome/browser/ui/apps/chrome_shell_window_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698