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

Unified Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm

Issue 12224020: Use gfx::NativeView rather than gfx::NativeWindow to identify web contents modal dialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
index 80ca7e0f4421ac7a6b8831cf8d0a20740028ec05..50d53512101aa1d0e3139cb8dac26c9027f3626a 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
@@ -24,6 +24,7 @@ ConstrainedWindowMac::ConstrainedWindowMac(
: delegate_(delegate),
web_contents_(web_contents),
sheet_([sheet retain]),
+ dummyView_([NSView alloc]),
pending_show_(false) {
DCHECK(web_contents);
DCHECK(sheet_.get());
@@ -76,9 +77,10 @@ void ConstrainedWindowMac::PulseWebContentsModalDialog() {
pulseSheet:sheet_];
}
-gfx::NativeWindow ConstrainedWindowMac::GetNativeWindow() {
- NOTREACHED();
- return nil;
+gfx::NativeView ConstrainedWindowMac::GetNativeView() {
+ // TODO(wittman): Return a NSView that is meaningful and unique to the window,
+ // and remove dummyView_.
+ return dummyView_.get();
}
void ConstrainedWindowMac::Observe(

Powered by Google App Engine
This is Rietveld 408576698