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 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 } | 804 } |
805 | 805 |
806 void BrowserView::EnterFullscreen( | 806 void BrowserView::EnterFullscreen( |
807 const GURL& url, FullscreenExitBubbleType bubble_type) { | 807 const GURL& url, FullscreenExitBubbleType bubble_type) { |
808 if (IsFullscreen()) | 808 if (IsFullscreen()) |
809 return; // Nothing to do. | 809 return; // Nothing to do. |
810 | 810 |
811 #if defined(OS_WIN) || defined(USE_AURA) | 811 #if defined(OS_WIN) || defined(USE_AURA) |
812 ProcessFullscreen(true, url, bubble_type); | 812 ProcessFullscreen(true, url, bubble_type); |
813 #else | 813 #else |
814 // On Linux/gtk changing fullscreen is async. Ask the window to change it's | 814 // On Linux/gtk changing fullscreen is async. Ask the window to change its |
815 // fullscreen state, and when done invoke ProcessFullscreen. | 815 // fullscreen state, and when done invoke ProcessFullscreen. |
816 fullscreen_request_.pending = true; | 816 fullscreen_request_.pending = true; |
817 fullscreen_request_.url = url; | 817 fullscreen_request_.url = url; |
818 fullscreen_request_.bubble_type = bubble_type; | 818 fullscreen_request_.bubble_type = bubble_type; |
819 frame_->SetFullscreen(true); | 819 frame_->SetFullscreen(true); |
820 #endif | 820 #endif |
821 } | 821 } |
822 | 822 |
823 void BrowserView::ExitFullscreen() { | 823 void BrowserView::ExitFullscreen() { |
824 if (!IsFullscreen()) | 824 if (!IsFullscreen()) |
825 return; // Nothing to do. | 825 return; // Nothing to do. |
826 | 826 |
827 #if defined(OS_WIN) || defined(USE_AURA) | 827 #if defined(OS_WIN) || defined(USE_AURA) |
828 ProcessFullscreen(false, GURL(), FEB_TYPE_NONE); | 828 ProcessFullscreen(false, GURL(), FEB_TYPE_NONE); |
829 #else | 829 #else |
830 fullscreen_request_.pending = false; | 830 fullscreen_request_.pending = false; |
831 // On Linux changing fullscreen is async. Ask the window to change it's | 831 // On Linux changing fullscreen is async. Ask the window to change its |
832 // fullscreen state, and when done invoke ProcessFullscreen. | 832 // fullscreen state, and when done invoke ProcessFullscreen. |
833 frame_->SetFullscreen(false); | 833 frame_->SetFullscreen(false); |
834 #endif | 834 #endif |
835 } | 835 } |
836 | 836 |
837 void BrowserView::UpdateFullscreenExitBubbleContent( | 837 void BrowserView::UpdateFullscreenExitBubbleContent( |
838 const GURL& url, | 838 const GURL& url, |
839 FullscreenExitBubbleType bubble_type) { | 839 FullscreenExitBubbleType bubble_type) { |
840 if (fullscreen_bubble_.get()) | 840 if (fullscreen_bubble_.get()) |
841 fullscreen_bubble_->UpdateContent(url, bubble_type); | 841 fullscreen_bubble_->UpdateContent(url, bubble_type); |
(...skipping 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2464 browser::CreateViewsBubble(bubble); | 2464 browser::CreateViewsBubble(bubble); |
2465 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 2465 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
2466 bubble->Show(); | 2466 bubble->Show(); |
2467 } | 2467 } |
2468 | 2468 |
2469 void BrowserView::ShowAvatarBubbleFromAvatarButton() { | 2469 void BrowserView::ShowAvatarBubbleFromAvatarButton() { |
2470 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); | 2470 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); |
2471 if (button) | 2471 if (button) |
2472 button->ShowAvatarBubble(); | 2472 button->ShowAvatarBubble(); |
2473 } | 2473 } |
OLD | NEW |