OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/previewable_contents_controller.h" | 5 #import "chrome/browser/ui/cocoa/previewable_contents_controller.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/mac_util.h" | 8 #include "base/mac/mac_util.h" |
9 #include "chrome/browser/tab_contents/tab_contents.h" | 9 #include "chrome/browser/tab_contents/tab_contents.h" |
10 | 10 |
11 @implementation PreviewableContentsController | 11 @implementation PreviewableContentsController |
12 | 12 |
13 @synthesize activeContainer = activeContainer_; | 13 @synthesize activeContainer = activeContainer_; |
14 | 14 |
15 - (id)init { | 15 - (id)init { |
16 if ((self = [super initWithNibName:@"PreviewableContents" | 16 if ((self = [super initWithNibName:@"PreviewableContents" |
17 bundle:mac_util::MainAppBundle()])) { | 17 bundle:base::mac::MainAppBundle()])) { |
18 } | 18 } |
19 return self; | 19 return self; |
20 } | 20 } |
21 | 21 |
22 - (void)showPreview:(TabContents*)preview { | 22 - (void)showPreview:(TabContents*)preview { |
23 DCHECK(preview); | 23 DCHECK(preview); |
24 | 24 |
25 // Remove any old preview contents before showing the new one. | 25 // Remove any old preview contents before showing the new one. |
26 if (previewContents_) | 26 if (previewContents_) |
27 [previewContents_->GetNativeView() removeFromSuperview]; | 27 [previewContents_->GetNativeView() removeFromSuperview]; |
(...skipping 15 matching lines...) Expand all Loading... |
43 [activeContainer_ setHidden:NO]; | 43 [activeContainer_ setHidden:NO]; |
44 | 44 |
45 previewContents_ = nil; | 45 previewContents_ = nil; |
46 } | 46 } |
47 | 47 |
48 - (BOOL)isShowingPreview { | 48 - (BOOL)isShowingPreview { |
49 return previewContents_ != nil; | 49 return previewContents_ != nil; |
50 } | 50 } |
51 | 51 |
52 @end | 52 @end |
OLD | NEW |