OLD | NEW |
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/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 web_contents->GetController().Reload(true); | 173 web_contents->GetController().Reload(true); |
174 } | 174 } |
175 | 175 |
176 bool HasConstrainedWindow(const Browser* browser) { | 176 bool HasConstrainedWindow(const Browser* browser) { |
177 WebContents* web_contents = GetActiveWebContents(browser); | 177 WebContents* web_contents = GetActiveWebContents(browser); |
178 if (!web_contents) | 178 if (!web_contents) |
179 return false; | 179 return false; |
180 | 180 |
181 ConstrainedWindowTabHelper* constrained_window_tab_helper = | 181 ConstrainedWindowTabHelper* constrained_window_tab_helper = |
182 ConstrainedWindowTabHelper::FromWebContents(web_contents); | 182 ConstrainedWindowTabHelper::FromWebContents(web_contents); |
183 return constrained_window_tab_helper->constrained_window_count() > 0; | 183 return constrained_window_tab_helper->dialog_count() > 0; |
184 } | 184 } |
185 | 185 |
186 bool PrintPreviewShowing(const Browser* browser) { | 186 bool PrintPreviewShowing(const Browser* browser) { |
187 WebContents* contents = browser->tab_strip_model()->GetActiveWebContents(); | 187 WebContents* contents = browser->tab_strip_model()->GetActiveWebContents(); |
188 printing::PrintPreviewTabController* controller = | 188 printing::PrintPreviewTabController* controller = |
189 printing::PrintPreviewTabController::GetInstance(); | 189 printing::PrintPreviewTabController::GetInstance(); |
190 return controller && (controller->GetPrintPreviewForTab(contents) || | 190 return controller && (controller->GetPrintPreviewForTab(contents) || |
191 controller->is_creating_print_preview_tab()); | 191 controller->is_creating_print_preview_tab()); |
192 } | 192 } |
193 | 193 |
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 Browser::CreateParams::CreateForApp( | 1074 Browser::CreateParams::CreateForApp( |
1075 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile())); | 1075 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile())); |
1076 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1076 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
1077 | 1077 |
1078 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1078 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
1079 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1079 contents->GetRenderViewHost()->SyncRendererPrefs(); |
1080 app_browser->window()->Show(); | 1080 app_browser->window()->Show(); |
1081 } | 1081 } |
1082 | 1082 |
1083 } // namespace chrome | 1083 } // namespace chrome |
OLD | NEW |