| 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 #import "chrome/browser/ui/cocoa/applescript/window_applescript.h" | 5 #import "chrome/browser/ui/cocoa/applescript/window_applescript.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #import "base/mac/scoped_nsobject.h" | 8 #import "base/mac/scoped_nsobject.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #import "chrome/browser/app_controller_mac.h" | 11 #import "chrome/browser/app_controller_mac.h" |
| 12 #import "chrome/browser/chrome_browser_application_mac.h" | 12 #import "chrome/browser/chrome_browser_application_mac.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/browser_commands.h" | 15 #include "chrome/browser/ui/browser_commands.h" |
| 16 #include "chrome/browser/ui/browser_finder.h" | 16 #include "chrome/browser/ui/browser_finder.h" |
| 17 #include "chrome/browser/ui/browser_navigator.h" | 17 #include "chrome/browser/ui/browser_navigator.h" |
| 18 #include "chrome/browser/ui/browser_tabstrip.h" | 18 #include "chrome/browser/ui/browser_tabstrip.h" |
| 19 #include "chrome/browser/ui/browser_window.h" | 19 #include "chrome/browser/ui/browser_window.h" |
| 20 #include "chrome/browser/ui/cocoa/applescript/constants_applescript.h" | 20 #include "chrome/browser/ui/cocoa/applescript/constants_applescript.h" |
| 21 #include "chrome/browser/ui/cocoa/applescript/error_applescript.h" | 21 #include "chrome/browser/ui/cocoa/applescript/error_applescript.h" |
| 22 #include "chrome/browser/ui/cocoa/applescript/metrics_applescript.h" | 22 #include "chrome/browser/ui/cocoa/applescript/metrics_applescript.h" |
| 23 #import "chrome/browser/ui/cocoa/applescript/tab_applescript.h" | 23 #import "chrome/browser/ui/cocoa/applescript/tab_applescript.h" |
| 24 #include "chrome/browser/ui/host_desktop.h" | |
| 25 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" | 24 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
| 26 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 25 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 27 #include "chrome/common/url_constants.h" | 26 #include "chrome/common/url_constants.h" |
| 28 #include "content/public/browser/web_contents.h" | 27 #include "content/public/browser/web_contents.h" |
| 28 #include "ui/gfx/host_desktop_type.h" |
| 29 | 29 |
| 30 @interface WindowAppleScript(WindowAppleScriptPrivateMethods) | 30 @interface WindowAppleScript(WindowAppleScriptPrivateMethods) |
| 31 // The NSWindow that corresponds to this window. | 31 // The NSWindow that corresponds to this window. |
| 32 - (NSWindow*)nativeHandle; | 32 - (NSWindow*)nativeHandle; |
| 33 @end | 33 @end |
| 34 | 34 |
| 35 @implementation WindowAppleScript | 35 @implementation WindowAppleScript |
| 36 | 36 |
| 37 - (id)init { | 37 - (id)init { |
| 38 // Check which mode to open a new window. | 38 // Check which mode to open a new window. |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 } | 273 } |
| 274 | 274 |
| 275 - (void)handlesExitPresentationMode:(NSScriptCommand*)command { | 275 - (void)handlesExitPresentationMode:(NSScriptCommand*)command { |
| 276 AppleScript::LogAppleScriptUMA( | 276 AppleScript::LogAppleScriptUMA( |
| 277 AppleScript::AppleScriptCommand::WINDOW_EXIT_PRESENTATION_MODE); | 277 AppleScript::AppleScriptCommand::WINDOW_EXIT_PRESENTATION_MODE); |
| 278 if (browser_->window()) | 278 if (browser_->window()) |
| 279 browser_->window()->ExitFullscreen(); | 279 browser_->window()->ExitFullscreen(); |
| 280 } | 280 } |
| 281 | 281 |
| 282 @end | 282 @end |
| OLD | NEW |