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/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1239 void BrowserView::ConfirmBrowserCloseWithPendingDownloads( | 1239 void BrowserView::ConfirmBrowserCloseWithPendingDownloads( |
1240 int download_count, | 1240 int download_count, |
1241 Browser::DownloadClosePreventionType dialog_type, | 1241 Browser::DownloadClosePreventionType dialog_type, |
1242 bool app_modal, | 1242 bool app_modal, |
1243 const base::Callback<void(bool)>& callback) { | 1243 const base::Callback<void(bool)>& callback) { |
1244 DownloadInProgressDialogView::Show( | 1244 DownloadInProgressDialogView::Show( |
1245 GetNativeWindow(), download_count, dialog_type, app_modal, callback); | 1245 GetNativeWindow(), download_count, dialog_type, app_modal, callback); |
1246 } | 1246 } |
1247 | 1247 |
1248 void BrowserView::UserChangedTheme() { | 1248 void BrowserView::UserChangedTheme() { |
1249 #if defined(OS_WIN) | |
1250 // If the browser is in fullscreen, get it out to enable the user to see the | |
1251 // theme change. This also fixes painting problems seen with switching to | |
1252 // glass while in fullscreen mode. | |
1253 if (IsFullscreen()) | |
sky
2014/08/19 13:19:36
This makes no sense to me. The user wants to toggl
ananta
2014/08/20 02:28:06
Please take a look at the updated patch. This has
| |
1254 chrome::ToggleFullscreenMode(browser_.get()); | |
1255 #endif | |
1249 frame_->FrameTypeChanged(); | 1256 frame_->FrameTypeChanged(); |
1250 } | 1257 } |
1251 | 1258 |
1252 int BrowserView::GetExtraRenderViewHeight() const { | 1259 int BrowserView::GetExtraRenderViewHeight() const { |
1253 // Currently this is only used on linux. | 1260 // Currently this is only used on linux. |
1254 return 0; | 1261 return 0; |
1255 } | 1262 } |
1256 | 1263 |
1257 void BrowserView::WebContentsFocused(WebContents* contents) { | 1264 void BrowserView::WebContentsFocused(WebContents* contents) { |
1258 if (contents_web_view_->GetWebContents() == contents) | 1265 if (contents_web_view_->GetWebContents() == contents) |
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2547 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2554 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
2548 gfx::Point icon_bottom( | 2555 gfx::Point icon_bottom( |
2549 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2556 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
2550 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2557 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
2551 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2558 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
2552 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2559 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
2553 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2560 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
2554 } | 2561 } |
2555 return top_arrow_height; | 2562 return top_arrow_height; |
2556 } | 2563 } |
OLD | NEW |