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

Side by Side Diff: chrome/browser/ui/browser_commands.cc

Issue 23815006: [Cleanup] rename WebContentsModalDialogManager::IsShowingDialog() to IsDialogActive() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 180 }
181 181
182 bool IsShowingWebContentsModalDialog(const Browser* browser) { 182 bool IsShowingWebContentsModalDialog(const Browser* browser) {
183 WebContents* web_contents = 183 WebContents* web_contents =
184 browser->tab_strip_model()->GetActiveWebContents(); 184 browser->tab_strip_model()->GetActiveWebContents();
185 if (!web_contents) 185 if (!web_contents)
186 return false; 186 return false;
187 187
188 WebContentsModalDialogManager* web_contents_modal_dialog_manager = 188 WebContentsModalDialogManager* web_contents_modal_dialog_manager =
189 WebContentsModalDialogManager::FromWebContents(web_contents); 189 WebContentsModalDialogManager::FromWebContents(web_contents);
190 return web_contents_modal_dialog_manager->IsShowingDialog(); 190 return web_contents_modal_dialog_manager->IsDialogActive();
191 } 191 }
192 192
193 bool PrintPreviewShowing(const Browser* browser) { 193 bool PrintPreviewShowing(const Browser* browser) {
194 #if defined(ENABLE_FULL_PRINTING) 194 #if defined(ENABLE_FULL_PRINTING)
195 WebContents* contents = browser->tab_strip_model()->GetActiveWebContents(); 195 WebContents* contents = browser->tab_strip_model()->GetActiveWebContents();
196 printing::PrintPreviewDialogController* controller = 196 printing::PrintPreviewDialogController* controller =
197 printing::PrintPreviewDialogController::GetInstance(); 197 printing::PrintPreviewDialogController::GetInstance();
198 return controller && (controller->GetPrintPreviewForContents(contents) || 198 return controller && (controller->GetPrintPreviewForContents(contents) ||
199 controller->is_creating_print_preview_dialog()); 199 controller->is_creating_print_preview_dialog());
200 #else 200 #else
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile(), 1117 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile(),
1118 browser->host_desktop_type())); 1118 browser->host_desktop_type()));
1119 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1119 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1120 1120
1121 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1121 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1122 contents->GetRenderViewHost()->SyncRendererPrefs(); 1122 contents->GetRenderViewHost()->SyncRendererPrefs();
1123 app_browser->window()->Show(); 1123 app_browser->window()->Show();
1124 } 1124 }
1125 1125
1126 } // namespace chrome 1126 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698