| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1194 WindowOpenDisposition disposition, | 1194 WindowOpenDisposition disposition, |
| 1195 const gfx::Rect& initial_pos, | 1195 const gfx::Rect& initial_pos, |
| 1196 bool user_gesture) { | 1196 bool user_gesture) { |
| 1197 AddNewContents(NULL, new_contents, disposition, initial_pos, user_gesture); | 1197 AddNewContents(NULL, new_contents, disposition, initial_pos, user_gesture); |
| 1198 } | 1198 } |
| 1199 | 1199 |
| 1200 void Browser::CloseTabContents(TabContents* contents) { | 1200 void Browser::CloseTabContents(TabContents* contents) { |
| 1201 CloseContents(contents); | 1201 CloseContents(contents); |
| 1202 } | 1202 } |
| 1203 | 1203 |
| 1204 #if defined(OS_CHROMEOS) |
| 1204 gfx::NativeWindow Browser::BrowserShowHtmlDialog( | 1205 gfx::NativeWindow Browser::BrowserShowHtmlDialog( |
| 1205 HtmlDialogUIDelegate* delegate, | 1206 HtmlDialogUIDelegate* delegate, |
| 1206 gfx::NativeWindow parent_window) { | 1207 gfx::NativeWindow parent_window, |
| 1207 #if defined(OS_CHROMEOS) | 1208 chromeos::BubbleWindowStyle style) { |
| 1208 // For Chrome OS, first try to parent the dialog over the current browser -- | 1209 // For Chrome OS, first try to parent the dialog over the current browser -- |
| 1209 // it's likely to be maximized onscreen. If it isn't tabbed (e.g. it's a | 1210 // it's likely to be maximized onscreen. If it isn't tabbed (e.g. it's a |
| 1210 // panel), find a browser that is. | 1211 // panel), find a browser that is. |
| 1211 parent_window = window_->GetNativeHandle(); | 1212 parent_window = window_->GetNativeHandle(); |
| 1212 if (!is_type_tabbed()) { | 1213 if (!is_type_tabbed()) { |
| 1213 Browser* tabbed_browser = BrowserList::FindTabbedBrowser(profile_, true); | 1214 Browser* tabbed_browser = BrowserList::FindTabbedBrowser(profile_, true); |
| 1214 if (tabbed_browser && tabbed_browser->window()) | 1215 if (tabbed_browser && tabbed_browser->window()) |
| 1215 parent_window = tabbed_browser->window()->GetNativeHandle(); | 1216 parent_window = tabbed_browser->window()->GetNativeHandle(); |
| 1216 } | 1217 } |
| 1218 #else |
| 1219 gfx::NativeWindow Browser::BrowserShowHtmlDialog( |
| 1220 HtmlDialogUIDelegate* delegate, |
| 1221 gfx::NativeWindow parent_window) { |
| 1217 #endif // defined(OS_CHROMEOS) | 1222 #endif // defined(OS_CHROMEOS) |
| 1218 if (!parent_window) | 1223 if (!parent_window) |
| 1219 parent_window = window_->GetNativeHandle(); | 1224 parent_window = window_->GetNativeHandle(); |
| 1220 | 1225 |
| 1226 #if defined(OS_CHROMEOS) |
| 1227 return browser::ShowHtmlDialog(parent_window, profile_, delegate, style); |
| 1228 #else |
| 1221 return browser::ShowHtmlDialog(parent_window, profile_, delegate); | 1229 return browser::ShowHtmlDialog(parent_window, profile_, delegate); |
| 1230 #endif |
| 1222 } | 1231 } |
| 1223 | 1232 |
| 1224 void Browser::BrowserRenderWidgetShowing() { | 1233 void Browser::BrowserRenderWidgetShowing() { |
| 1225 RenderWidgetShowing(); | 1234 RenderWidgetShowing(); |
| 1226 } | 1235 } |
| 1227 | 1236 |
| 1228 void Browser::BookmarkBarSizeChanged(bool is_animating) { | 1237 void Browser::BookmarkBarSizeChanged(bool is_animating) { |
| 1229 window_->ToolbarSizeChanged(is_animating); | 1238 window_->ToolbarSizeChanged(is_animating); |
| 1230 } | 1239 } |
| 1231 | 1240 |
| (...skipping 4275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5507 } | 5516 } |
| 5508 | 5517 |
| 5509 void Browser::UpdateFullscreenExitBubbleContent() { | 5518 void Browser::UpdateFullscreenExitBubbleContent() { |
| 5510 GURL url; | 5519 GURL url; |
| 5511 if (fullscreened_tab_) | 5520 if (fullscreened_tab_) |
| 5512 url = fullscreened_tab_->tab_contents()->GetURL(); | 5521 url = fullscreened_tab_->tab_contents()->GetURL(); |
| 5513 | 5522 |
| 5514 window_->UpdateFullscreenExitBubbleContent( | 5523 window_->UpdateFullscreenExitBubbleContent( |
| 5515 url, GetFullscreenExitBubbleType()); | 5524 url, GetFullscreenExitBubbleType()); |
| 5516 } | 5525 } |
| OLD | NEW |