| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/logging.h" // for NOTREACHED() | 7 #include "base/logging.h" // for NOTREACHED() |
| 8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
| 9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
| 12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | |
| 14 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 13 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 15 #include "chrome/browser/ui/cocoa/event_utils.h" | 14 #include "chrome/browser/ui/cocoa/event_utils.h" |
| 16 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h" | 15 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h" |
| 17 #import "chrome/browser/ui/cocoa/hyperlink_text_view.h" | 16 #import "chrome/browser/ui/cocoa/hyperlink_text_view.h" |
| 18 #import "chrome/browser/ui/cocoa/info_bubble_view.h" | 17 #import "chrome/browser/ui/cocoa/info_bubble_view.h" |
| 19 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 18 #import "chrome/browser/ui/cocoa/info_bubble_window.h" |
| 20 #include "chrome/browser/ui/fullscreen_exit_bubble_type.h" | 19 #include "chrome/browser/ui/fullscreen_exit_bubble_type.h" |
| 20 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 21 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
| 22 #include "grit/ui_strings.h" | 22 #include "grit/ui_strings.h" |
| 23 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
| 23 #include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" | 24 #include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" |
| 24 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | |
| 25 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" | 25 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" |
| 26 #include "ui/base/models/accelerator_cocoa.h" | 26 #include "ui/base/accelerators/accelerator_cocoa.h" |
| 27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
| 28 #include "ui/base/l10n/l10n_util_mac.h" | 28 #include "ui/base/l10n/l10n_util_mac.h" |
| 29 | 29 |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 const float kInitialDelay = 3.8; | 32 const float kInitialDelay = 3.8; |
| 33 const float kHideDuration = 0.7; | 33 const float kHideDuration = 0.7; |
| 34 } // namespace | 34 } // namespace |
| 35 | 35 |
| 36 @interface OneClickHyperlinkTextView : HyperlinkTextView | 36 @interface OneClickHyperlinkTextView : HyperlinkTextView |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 - (void)hideSoon { | 320 - (void)hideSoon { |
| 321 hideTimer_.reset( | 321 hideTimer_.reset( |
| 322 [[NSTimer scheduledTimerWithTimeInterval:kInitialDelay | 322 [[NSTimer scheduledTimerWithTimeInterval:kInitialDelay |
| 323 target:self | 323 target:self |
| 324 selector:@selector(hideTimerFired:) | 324 selector:@selector(hideTimerFired:) |
| 325 userInfo:nil | 325 userInfo:nil |
| 326 repeats:NO] retain]); | 326 repeats:NO] retain]); |
| 327 } | 327 } |
| 328 | 328 |
| 329 @end | 329 @end |
| OLD | NEW |