OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 const gfx::Point& point) const { | 432 const gfx::Point& point) const { |
433 // The background image starts tiling horizontally at the window left edge and | 433 // The background image starts tiling horizontally at the window left edge and |
434 // vertically at the top edge of the horizontal tab strip (or where it would | 434 // vertically at the top edge of the horizontal tab strip (or where it would |
435 // be). We expect our parent's origin to be the window origin. | 435 // be). We expect our parent's origin to be the window origin. |
436 gfx::Point window_point(point.Add(GetMirroredPosition())); | 436 gfx::Point window_point(point.Add(GetMirroredPosition())); |
437 window_point.Offset(frame_->GetThemeBackgroundXInset(), | 437 window_point.Offset(frame_->GetThemeBackgroundXInset(), |
438 -frame_->GetTabStripInsets(false).top); | 438 -frame_->GetTabStripInsets(false).top); |
439 return window_point; | 439 return window_point; |
440 } | 440 } |
441 | 441 |
| 442 void BrowserView::RemoveFullScreenExitBubble() { |
| 443 fullscreen_bubble_.reset(); |
| 444 } |
| 445 |
442 bool BrowserView::IsTabStripVisible() const { | 446 bool BrowserView::IsTabStripVisible() const { |
443 return browser_->SupportsWindowFeature(Browser::FEATURE_TABSTRIP); | 447 return browser_->SupportsWindowFeature(Browser::FEATURE_TABSTRIP); |
444 } | 448 } |
445 | 449 |
446 bool BrowserView::IsOffTheRecord() const { | 450 bool BrowserView::IsOffTheRecord() const { |
447 return browser_->profile()->IsOffTheRecord(); | 451 return browser_->profile()->IsOffTheRecord(); |
448 } | 452 } |
449 | 453 |
450 bool BrowserView::IsGuestSession() const { | 454 bool BrowserView::IsGuestSession() const { |
451 return browser_->profile()->IsGuestSession(); | 455 return browser_->profile()->IsGuestSession(); |
(...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2423 else if (key_code == ui::VKEY_RIGHT) | 2427 else if (key_code == ui::VKEY_RIGHT) |
2424 content::RecordAction(UserMetricsAction("Accel_Forward_Right")); | 2428 content::RecordAction(UserMetricsAction("Accel_Forward_Right")); |
2425 break; | 2429 break; |
2426 case IDC_RELOAD: | 2430 case IDC_RELOAD: |
2427 case IDC_RELOAD_IGNORING_CACHE: | 2431 case IDC_RELOAD_IGNORING_CACHE: |
2428 if (key_code == ui::VKEY_R) | 2432 if (key_code == ui::VKEY_R) |
2429 content::RecordAction(UserMetricsAction("Accel_Reload_R")); | 2433 content::RecordAction(UserMetricsAction("Accel_Reload_R")); |
2430 else if (key_code == ui::VKEY_F3) | 2434 else if (key_code == ui::VKEY_F3) |
2431 content::RecordAction(UserMetricsAction("Accel_Reload_F3")); | 2435 content::RecordAction(UserMetricsAction("Accel_Reload_F3")); |
2432 break; | 2436 break; |
2433 case IDC_FULLSCREEN: | |
2434 if (key_code == ui::VKEY_F4) | |
2435 content::RecordAction(UserMetricsAction("Accel_Fullscreen_F4")); | |
2436 break; | |
2437 case IDC_FOCUS_LOCATION: | 2437 case IDC_FOCUS_LOCATION: |
2438 if (key_code == ui::VKEY_D) | 2438 if (key_code == ui::VKEY_D) |
2439 content::RecordAction(UserMetricsAction("Accel_FocusLocation_D")); | 2439 content::RecordAction(UserMetricsAction("Accel_FocusLocation_D")); |
2440 else if (key_code == ui::VKEY_L) | 2440 else if (key_code == ui::VKEY_L) |
2441 content::RecordAction(UserMetricsAction("Accel_FocusLocation_L")); | 2441 content::RecordAction(UserMetricsAction("Accel_FocusLocation_L")); |
2442 break; | 2442 break; |
2443 case IDC_FOCUS_SEARCH: | 2443 case IDC_FOCUS_SEARCH: |
2444 if (key_code == ui::VKEY_E) | 2444 if (key_code == ui::VKEY_E) |
2445 content::RecordAction(UserMetricsAction("Accel_FocusSearch_E")); | 2445 content::RecordAction(UserMetricsAction("Accel_FocusSearch_E")); |
2446 else if (key_code == ui::VKEY_K) | 2446 else if (key_code == ui::VKEY_K) |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2615 | 2615 |
2616 Browser* modal_browser = | 2616 Browser* modal_browser = |
2617 browser::FindBrowserWithWebContents(active_dialog->web_contents()); | 2617 browser::FindBrowserWithWebContents(active_dialog->web_contents()); |
2618 if (modal_browser && (browser_ != modal_browser)) { | 2618 if (modal_browser && (browser_ != modal_browser)) { |
2619 modal_browser->window()->FlashFrame(true); | 2619 modal_browser->window()->FlashFrame(true); |
2620 modal_browser->window()->Activate(); | 2620 modal_browser->window()->Activate(); |
2621 } | 2621 } |
2622 | 2622 |
2623 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2623 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
2624 } | 2624 } |
OLD | NEW |