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

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

Issue 11647017: Rename platform-independent ConstrainedWindow types to WebContentsModalDialog types (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: stage changes to preserve history Created 8 years 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 99311bcb6c416c46e99a222bc24233fe2f0a925f..61767151fca86ae0dee05c8b017c1796ba6448c0 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
@@ -29,7 +29,7 @@ ConstrainedWindowMac::ConstrainedWindowMac(
DCHECK(sheet_.get());
ConstrainedWindowTabHelper* constrained_window_tab_helper =
ConstrainedWindowTabHelper::FromWebContents(web_contents);
- constrained_window_tab_helper->AddConstrainedDialog(this);
+ constrained_window_tab_helper->AddDialog(this);
registrar_.Add(this,
content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED,
@@ -40,7 +40,7 @@ ConstrainedWindowMac::~ConstrainedWindowMac() {
CHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
}
-void ConstrainedWindowMac::ShowConstrainedWindow() {
+void ConstrainedWindowMac::ShowWebContentsModalDialog() {
NSWindow* parent_window = GetParentWindow();
NSView* parent_view = GetSheetParentViewForWebContents(web_contents_);
if (!parent_window || !parent_view) {
@@ -54,7 +54,7 @@ void ConstrainedWindowMac::ShowConstrainedWindow() {
[controller showSheet:sheet_ forParentView:parent_view];
}
-void ConstrainedWindowMac::CloseConstrainedWindow() {
+void ConstrainedWindowMac::CloseWebContentsModalDialog() {
// This function may be called even if the constrained window was never shown.
// Unset |pending_show_| to prevent the window from being reshown.
pending_show_ = false;
@@ -68,7 +68,7 @@ void ConstrainedWindowMac::CloseConstrainedWindow() {
delegate_->OnConstrainedWindowClosed(this);
}
-void ConstrainedWindowMac::PulseConstrainedWindow() {
+void ConstrainedWindowMac::PulseWebContentsModalDialog() {
[[ConstrainedWindowSheetController controllerForSheet:sheet_]
pulseSheet:sheet_];
}
@@ -78,7 +78,7 @@ gfx::NativeWindow ConstrainedWindowMac::GetNativeWindow() {
return nil;
}
-bool ConstrainedWindowMac::CanShowConstrainedWindow() {
+bool ConstrainedWindowMac::CanShowWebContentsModalDialog() {
Browser* browser = chrome::FindBrowserWithWebContents(web_contents_);
if (!browser)
return true;
@@ -96,7 +96,7 @@ void ConstrainedWindowMac::Observe(
if (pending_show_) {
pending_show_ = false;
- ShowConstrainedWindow();
+ ShowWebContentsModalDialog();
}
}

Powered by Google App Engine
This is Rietveld 408576698