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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 #include "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h" | 164 #include "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h" |
165 #endif | 165 #endif |
166 | 166 |
167 #if defined(OS_CHROMEOS) | 167 #if defined(OS_CHROMEOS) |
168 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" | 168 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" |
169 #endif | 169 #endif |
170 | 170 |
171 using base::TimeDelta; | 171 using base::TimeDelta; |
172 using base::UserMetricsAction; | 172 using base::UserMetricsAction; |
173 using content::NativeWebKeyboardEvent; | 173 using content::NativeWebKeyboardEvent; |
174 using content::SSLStatus; | |
175 using content::WebContents; | 174 using content::WebContents; |
176 using views::ColumnSet; | 175 using views::ColumnSet; |
177 using views::GridLayout; | 176 using views::GridLayout; |
178 using web_modal::WebContentsModalDialogHost; | 177 using web_modal::WebContentsModalDialogHost; |
179 | 178 |
180 namespace { | 179 namespace { |
181 | 180 |
182 // The name of a key to store on the window handle so that other code can | 181 // The name of a key to store on the window handle so that other code can |
183 // locate this object using just the handle. | 182 // locate this object using just the handle. |
184 const char* const kBrowserViewKey = "__BROWSER_VIEW__"; | 183 const char* const kBrowserViewKey = "__BROWSER_VIEW__"; |
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 bool app_modal, | 1378 bool app_modal, |
1380 const base::Callback<void(bool)>& callback) { | 1379 const base::Callback<void(bool)>& callback) { |
1381 DownloadInProgressDialogView::Show( | 1380 DownloadInProgressDialogView::Show( |
1382 GetNativeWindow(), download_count, dialog_type, app_modal, callback); | 1381 GetNativeWindow(), download_count, dialog_type, app_modal, callback); |
1383 } | 1382 } |
1384 | 1383 |
1385 void BrowserView::UserChangedTheme() { | 1384 void BrowserView::UserChangedTheme() { |
1386 frame_->FrameTypeChanged(); | 1385 frame_->FrameTypeChanged(); |
1387 } | 1386 } |
1388 | 1387 |
1389 void BrowserView::ShowWebsiteSettings(Profile* profile, | 1388 void BrowserView::ShowWebsiteSettings( |
1390 content::WebContents* web_contents, | 1389 Profile* profile, |
1391 const GURL& url, | 1390 content::WebContents* web_contents, |
1392 const content::SSLStatus& ssl) { | 1391 const GURL& url, |
| 1392 const SecurityStateModel::SecurityInfo& security_info) { |
1393 // Some browser windows have a location icon embedded in the frame. Try to | 1393 // Some browser windows have a location icon embedded in the frame. Try to |
1394 // use that if it exists. If it doesn't exist, use the location icon from | 1394 // use that if it exists. If it doesn't exist, use the location icon from |
1395 // the location bar. | 1395 // the location bar. |
1396 views::View* popup_anchor = frame_->GetLocationIconView(); | 1396 views::View* popup_anchor = frame_->GetLocationIconView(); |
1397 if (!popup_anchor) | 1397 if (!popup_anchor) |
1398 popup_anchor = GetLocationBarView()->location_icon_view(); | 1398 popup_anchor = GetLocationBarView()->location_icon_view(); |
1399 | 1399 |
1400 WebsiteSettingsPopupView::ShowPopup(popup_anchor, gfx::Rect(), profile, | 1400 WebsiteSettingsPopupView::ShowPopup(popup_anchor, gfx::Rect(), profile, |
1401 web_contents, url, ssl); | 1401 web_contents, url, security_info); |
1402 } | 1402 } |
1403 | 1403 |
1404 void BrowserView::ShowAppMenu() { | 1404 void BrowserView::ShowAppMenu() { |
1405 // Keep the top-of-window views revealed as long as the app menu is visible. | 1405 // Keep the top-of-window views revealed as long as the app menu is visible. |
1406 scoped_ptr<ImmersiveRevealedLock> revealed_lock( | 1406 scoped_ptr<ImmersiveRevealedLock> revealed_lock( |
1407 immersive_mode_controller_->GetRevealedLock( | 1407 immersive_mode_controller_->GetRevealedLock( |
1408 ImmersiveModeController::ANIMATE_REVEAL_NO)); | 1408 ImmersiveModeController::ANIMATE_REVEAL_NO)); |
1409 | 1409 |
1410 toolbar_->app_menu()->Activate(); | 1410 toolbar_->app_menu()->Activate(); |
1411 } | 1411 } |
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2638 return immersive_mode_controller()->IsEnabled(); | 2638 return immersive_mode_controller()->IsEnabled(); |
2639 } | 2639 } |
2640 | 2640 |
2641 views::Widget* BrowserView::GetBubbleAssociatedWidget() { | 2641 views::Widget* BrowserView::GetBubbleAssociatedWidget() { |
2642 return GetWidget(); | 2642 return GetWidget(); |
2643 } | 2643 } |
2644 | 2644 |
2645 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { | 2645 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { |
2646 return top_container_->GetBoundsInScreen(); | 2646 return top_container_->GetBoundsInScreen(); |
2647 } | 2647 } |
OLD | NEW |