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

Unified Diff: chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc

Issue 965103005: MacViews: Replace aura::WindowTracker with NativeWindowTracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@FirstResponder
Patch Set: Created 5 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc
diff --git a/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc b/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc
index 2d2077bd4949b94329812d4bb2a6eef85d5951b0..847bcc775c9297b85f497656a1878386f074b849 100644
--- a/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc
+++ b/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc
@@ -6,13 +6,14 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/app_list/app_list_service.h"
+#include "chrome/browser/ui/native_window_tracker.h"
#include "chrome/grit/generated_resources.h"
#include "components/constrained_window/constrained_window_views.h"
#include "extensions/common/extension.h"
-#include "ui/aura/window_tracker.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/layer.h"
@@ -36,7 +37,7 @@ class ExtensionUninstallDialogViews
public:
ExtensionUninstallDialogViews(
Profile* profile,
- aura::Window* parent,
+ gfx::NativeWindow parent,
extensions::ExtensionUninstallDialog::Delegate* delegate);
~ExtensionUninstallDialogViews() override;
@@ -54,10 +55,10 @@ class ExtensionUninstallDialogViews
ExtensionUninstallDialogDelegateView* view_;
// The dialog's parent window.
- aura::Window* parent_;
+ gfx::NativeWindow parent_;
// Tracks whether |parent_| got destroyed.
- aura::WindowTracker parent_window_tracker_;
+ scoped_ptr<NativeWindowTracker> parent_window_tracker_;
DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialogViews);
};
@@ -107,13 +108,13 @@ class ExtensionUninstallDialogDelegateView : public views::DialogDelegateView {
ExtensionUninstallDialogViews::ExtensionUninstallDialogViews(
Profile* profile,
- aura::Window* parent,
+ gfx::NativeWindow parent,
extensions::ExtensionUninstallDialog::Delegate* delegate)
: extensions::ExtensionUninstallDialog(profile, delegate),
view_(NULL),
parent_(parent) {
if (parent_)
- parent_window_tracker_.Add(parent_);
+ parent_window_tracker_ = NativeWindowTracker::Create(parent_);
}
ExtensionUninstallDialogViews::~ExtensionUninstallDialogViews() {
@@ -125,7 +126,7 @@ ExtensionUninstallDialogViews::~ExtensionUninstallDialogViews() {
}
void ExtensionUninstallDialogViews::Show() {
- if (parent_ && !parent_window_tracker_.Contains(parent_)) {
+ if (parent_ && parent_window_tracker_->WasNativeWindowClosed()) {
delegate_->ExtensionUninstallCanceled();
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698