| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 #include "chrome/browser/ui/views/tabs/tab.h" | 74 #include "chrome/browser/ui/views/tabs/tab.h" |
| 75 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 75 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 76 #include "chrome/browser/ui/views/toolbar_view.h" | 76 #include "chrome/browser/ui/views/toolbar_view.h" |
| 77 #include "chrome/browser/ui/views/update_recommended_message_box.h" | 77 #include "chrome/browser/ui/views/update_recommended_message_box.h" |
| 78 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" | 78 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" |
| 79 #include "chrome/browser/ui/window_sizer/window_sizer.h" | 79 #include "chrome/browser/ui/window_sizer/window_sizer.h" |
| 80 #include "chrome/common/chrome_notification_types.h" | 80 #include "chrome/common/chrome_notification_types.h" |
| 81 #include "chrome/common/chrome_switches.h" | 81 #include "chrome/common/chrome_switches.h" |
| 82 #include "chrome/common/extensions/extension_resource.h" | 82 #include "chrome/common/extensions/extension_resource.h" |
| 83 #include "chrome/common/pref_names.h" | 83 #include "chrome/common/pref_names.h" |
| 84 #include "chrome/common/switch_utils.h" |
| 84 #include "chrome/common/url_constants.h" | 85 #include "chrome/common/url_constants.h" |
| 85 #include "content/public/browser/download_manager.h" | 86 #include "content/public/browser/download_manager.h" |
| 86 #include "content/public/browser/native_web_keyboard_event.h" | 87 #include "content/public/browser/native_web_keyboard_event.h" |
| 87 #include "content/public/browser/notification_service.h" | 88 #include "content/public/browser/notification_service.h" |
| 88 #include "content/public/browser/render_view_host.h" | 89 #include "content/public/browser/render_view_host.h" |
| 89 #include "content/public/browser/render_widget_host.h" | 90 #include "content/public/browser/render_widget_host.h" |
| 90 #include "content/public/browser/user_metrics.h" | 91 #include "content/public/browser/user_metrics.h" |
| 91 #include "content/public/browser/web_contents.h" | 92 #include "content/public/browser/web_contents.h" |
| 92 #include "content/public/browser/web_contents_view.h" | 93 #include "content/public/browser/web_contents_view.h" |
| 93 #include "content/public/common/content_switches.h" | 94 #include "content/public/common/content_switches.h" |
| (...skipping 2178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2272 frame_->native_widget())->SetMetroSnapFullscreen(fullscreen); | 2273 frame_->native_widget())->SetMetroSnapFullscreen(fullscreen); |
| 2273 #endif | 2274 #endif |
| 2274 } else { | 2275 } else { |
| 2275 // Toggle fullscreen mode. | 2276 // Toggle fullscreen mode. |
| 2276 frame_->SetFullscreen(fullscreen); | 2277 frame_->SetFullscreen(fullscreen); |
| 2277 } | 2278 } |
| 2278 | 2279 |
| 2279 browser_->WindowFullscreenStateChanged(); | 2280 browser_->WindowFullscreenStateChanged(); |
| 2280 | 2281 |
| 2281 if (fullscreen) { | 2282 if (fullscreen) { |
| 2282 bool is_kiosk = | 2283 if (!switches::IsRunningInAppMode() && type != FOR_METRO) { |
| 2283 CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode); | |
| 2284 if (!is_kiosk && type != FOR_METRO) { | |
| 2285 fullscreen_bubble_.reset(new FullscreenExitBubbleViews( | 2284 fullscreen_bubble_.reset(new FullscreenExitBubbleViews( |
| 2286 GetWidget(), browser_.get(), url, bubble_type)); | 2285 GetWidget(), browser_.get(), url, bubble_type)); |
| 2287 } | 2286 } |
| 2288 } else { | 2287 } else { |
| 2289 #if defined(OS_WIN) && !defined(USE_AURA) | 2288 #if defined(OS_WIN) && !defined(USE_AURA) |
| 2290 if (omnibox_win) { | 2289 if (omnibox_win) { |
| 2291 // Show the edit again since we're no longer in fullscreen mode. | 2290 // Show the edit again since we're no longer in fullscreen mode. |
| 2292 omnibox_win->set_force_hidden(false); | 2291 omnibox_win->set_force_hidden(false); |
| 2293 ShowWindow(omnibox_win->m_hWnd, SW_SHOW); | 2292 ShowWindow(omnibox_win->m_hWnd, SW_SHOW); |
| 2294 } | 2293 } |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2601 | 2600 |
| 2602 Browser* modal_browser = | 2601 Browser* modal_browser = |
| 2603 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); | 2602 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2604 if (modal_browser && (browser_ != modal_browser)) { | 2603 if (modal_browser && (browser_ != modal_browser)) { |
| 2605 modal_browser->window()->FlashFrame(true); | 2604 modal_browser->window()->FlashFrame(true); |
| 2606 modal_browser->window()->Activate(); | 2605 modal_browser->window()->Activate(); |
| 2607 } | 2606 } |
| 2608 | 2607 |
| 2609 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2608 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2610 } | 2609 } |
| OLD | NEW |