OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/views/frame/browser_view.h" | 5 #include "chrome/browser/views/frame/browser_view.h" |
6 | 6 |
7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 | 886 |
887 // Notify extension shelf, so it can set itself to the appropriate drawing | 887 // Notify extension shelf, so it can set itself to the appropriate drawing |
888 // state. | 888 // state. |
889 if (extension_shelf_) | 889 if (extension_shelf_) |
890 extension_shelf_->OnFullscreenToggled(fullscreen); | 890 extension_shelf_->OnFullscreenToggled(fullscreen); |
891 | 891 |
892 // Toggle fullscreen mode. | 892 // Toggle fullscreen mode. |
893 frame_->GetWindow()->SetFullscreen(fullscreen); | 893 frame_->GetWindow()->SetFullscreen(fullscreen); |
894 | 894 |
895 if (fullscreen) { | 895 if (fullscreen) { |
896 fullscreen_bubble_.reset(new FullscreenExitBubble(GetWidget(), | 896 #if !defined(OS_MACOSX) |
897 browser_.get())); | 897 bool is_kosk = |
| 898 CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode); |
| 899 #else |
| 900 bool is_kiosk = false; |
| 901 #endif |
| 902 if (!is_kosk) { |
| 903 fullscreen_bubble_.reset(new FullscreenExitBubble(GetWidget(), |
| 904 browser_.get())); |
| 905 } |
898 } else { | 906 } else { |
899 #if defined(OS_WIN) | 907 #if defined(OS_WIN) |
900 // Show the edit again since we're no longer in fullscreen mode. | 908 // Show the edit again since we're no longer in fullscreen mode. |
901 edit_view->set_force_hidden(false); | 909 edit_view->set_force_hidden(false); |
902 ShowWindow(edit_view->m_hWnd, SW_SHOW); | 910 ShowWindow(edit_view->m_hWnd, SW_SHOW); |
903 #endif | 911 #endif |
904 } | 912 } |
905 | 913 |
906 // Undo our anti-jankiness hacks and force the window to relayout now that | 914 // Undo our anti-jankiness hacks and force the window to relayout now that |
907 // it's in its final position. | 915 // it's in its final position. |
908 ignore_layout_ = false; | 916 ignore_layout_ = false; |
909 Layout(); | 917 Layout(); |
910 #if defined(OS_WIN) | 918 #if defined(OS_WIN) |
911 frame_->GetWindow()->PopForceHidden(); | 919 frame_->GetWindow()->PopForceHidden(); |
912 #endif | 920 #endif |
913 } | 921 } |
914 | 922 |
915 bool BrowserView::IsFullscreen() const { | 923 bool BrowserView::IsFullscreen() const { |
916 return frame_->GetWindow()->IsFullscreen(); | 924 return frame_->GetWindow()->IsFullscreen(); |
917 } | 925 } |
918 | 926 |
| 927 bool BrowserView::IsFullscreenBubbleVisible() const { |
| 928 return fullscreen_bubble_.get() ? true : false; |
| 929 } |
| 930 |
919 LocationBar* BrowserView::GetLocationBar() const { | 931 LocationBar* BrowserView::GetLocationBar() const { |
920 return toolbar_->location_bar(); | 932 return toolbar_->location_bar(); |
921 } | 933 } |
922 | 934 |
923 void BrowserView::SetFocusToLocationBar() { | 935 void BrowserView::SetFocusToLocationBar() { |
924 LocationBarView* location_bar = toolbar_->location_bar(); | 936 LocationBarView* location_bar = toolbar_->location_bar(); |
925 if (location_bar->IsFocusable()) { | 937 if (location_bar->IsFocusable()) { |
926 location_bar->FocusLocation(); | 938 location_bar->FocusLocation(); |
927 } else { | 939 } else { |
928 views::FocusManager* focus_manager = GetFocusManager(); | 940 views::FocusManager* focus_manager = GetFocusManager(); |
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2257 | 2269 |
2258 // static | 2270 // static |
2259 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2271 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2260 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2272 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2261 } | 2273 } |
2262 | 2274 |
2263 // static | 2275 // static |
2264 void BrowserList::AllBrowsersClosed() { | 2276 void BrowserList::AllBrowsersClosed() { |
2265 views::Window::CloseAllSecondaryWindows(); | 2277 views::Window::CloseAllSecondaryWindows(); |
2266 } | 2278 } |
OLD | NEW |