Commit b5884ab0 authored by thestig@chromium.org's avatar thestig@chromium.org

Cleanup: Use a scoper in JSModalDialogViews.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/8771032

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112771 0039d316-1c4b-4281-b951-d872f2087c98
parent c1bb6754
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include "chrome/browser/ui/views/js_modal_dialog_views.h" #include "chrome/browser/ui/views/js_modal_dialog_views.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" #include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h"
#include "chrome/browser/ui/dialog_style.h" #include "chrome/browser/ui/dialog_style.h"
#include "chrome/browser/ui/views/window.h" #include "chrome/browser/ui/views/window.h"
#include "grit/generated_resources.h" #include "grit/generated_resources.h"
...@@ -100,7 +100,6 @@ void JSModalDialogViews::WindowClosing() { ...@@ -100,7 +100,6 @@ void JSModalDialogViews::WindowClosing() {
} }
void JSModalDialogViews::DeleteDelegate() { void JSModalDialogViews::DeleteDelegate() {
delete parent_;
delete this; delete this;
} }
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
#define CHROME_BROWSER_UI_VIEWS_JS_MODAL_DIALOG_VIEWS_H_ #define CHROME_BROWSER_UI_VIEWS_JS_MODAL_DIALOG_VIEWS_H_
#pragma once #pragma once
#include <string> #include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h"
#include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h"
#include "ui/views/window/dialog_delegate.h" #include "ui/views/window/dialog_delegate.h"
class JavaScriptAppModalDialog;
namespace views { namespace views {
class MessageBoxView; class MessageBoxView;
} }
...@@ -50,7 +50,7 @@ class JSModalDialogViews : public NativeAppModalDialog, ...@@ -50,7 +50,7 @@ class JSModalDialogViews : public NativeAppModalDialog,
private: private:
// A pointer to the AppModalDialog that owns us. // A pointer to the AppModalDialog that owns us.
JavaScriptAppModalDialog* parent_; scoped_ptr<JavaScriptAppModalDialog> parent_;
// The message box view whose commands we handle. // The message box view whose commands we handle.
views::MessageBoxView* message_box_view_; views::MessageBoxView* message_box_view_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment