summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/nibs/PreviewableContents.xib97
-rw-r--r--chrome/app/theme/match_preview_tear.pngbin2303 -> 0 bytes
-rw-r--r--chrome/app/theme/theme_resources.grd1
-rw-r--r--chrome/browser/cocoa/previewable_contents_controller.h6
-rw-r--r--chrome/browser/cocoa/previewable_contents_controller.mm41
-rw-r--r--chrome/browser/cocoa/previewable_contents_controller_unittest.mm15
-rw-r--r--chrome/chrome_dll.gypi1
7 files changed, 4 insertions, 157 deletions
diff --git a/chrome/app/nibs/PreviewableContents.xib b/chrome/app/nibs/PreviewableContents.xib
index 45e4061..f7736a1 100644
--- a/chrome/app/nibs/PreviewableContents.xib
+++ b/chrome/app/nibs/PreviewableContents.xib
@@ -3,17 +3,16 @@
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">10F569</string>
- <string key="IBDocument.InterfaceBuilderVersion">788</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">788</string>
+ <string key="NS.object.0">823</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="1"/>
- <integer value="3"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -56,47 +55,11 @@
<reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
- <object class="NSButton" id="1006575895">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrameSize">{72, 72}</string>
- <reference key="NSSuperview"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="476585549">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">167804928</int>
- <string key="NSContents"/>
- <object class="NSFont" key="NSSupport">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">1044</int>
- </object>
- <reference key="NSControlView" ref="1006575895"/>
- <int key="NSButtonFlags">-2039201537</int>
- <int key="NSButtonFlags2">6</int>
- <object class="NSCustomResource" key="NSNormalImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">match_preview_tear</string>
- </object>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">400</int>
- <int key="NSPeriodicInterval">75</int>
- </object>
- </object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">closePreview:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1006575895"/>
- </object>
- <int key="connectionID">5</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="1001"/>
@@ -112,14 +75,6 @@
</object>
<int key="connectionID">9</int>
</object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">closeButton_</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1006575895"/>
- </object>
- <int key="connectionID">10</int>
- </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -162,20 +117,6 @@
<reference key="object" ref="115467025"/>
<reference key="parent" ref="1005"/>
</object>
- <object class="IBObjectRecord">
- <int key="objectID">3</int>
- <reference key="object" ref="1006575895"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="476585549"/>
- </object>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">4</int>
- <reference key="object" ref="476585549"/>
- <reference key="parent" ref="1006575895"/>
- </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -190,9 +131,6 @@
<string>1.WindowOrigin</string>
<string>1.editorWindowContentRectSynchronizationRect</string>
<string>2.IBPluginDependency</string>
- <string>3.IBEditorWindowLastContentRect</string>
- <string>3.IBPluginDependency</string>
- <string>4.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -204,9 +142,6 @@
<string>{628, 654}</string>
<string>{{357, 416}, {480, 272}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{1085, 1084}, {72, 72}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -320,14 +255,6 @@
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
- <string key="className">NSActionCell</string>
- <string key="superclassName">NSCell</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSActionCell.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">NSApplication</string>
<string key="superclassName">NSResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="776831865">
@@ -372,22 +299,6 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">NSButtonCell</string>
- <string key="superclassName">NSActionCell</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSButtonCell.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSCell</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSCell.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">NSControl</string>
<string key="superclassName">NSView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="785514353">
@@ -982,9 +893,5 @@
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">../../chrome.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
- <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
- <string key="NS.key.0">match_preview_tear</string>
- <string key="NS.object.0">{72, 72}</string>
- </object>
</data>
</archive>
diff --git a/chrome/app/theme/match_preview_tear.png b/chrome/app/theme/match_preview_tear.png
deleted file mode 100644
index 17ee2b4..0000000
--- a/chrome/app/theme/match_preview_tear.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd
index e6ad42c..ce8b295 100644
--- a/chrome/app/theme/theme_resources.grd
+++ b/chrome/app/theme/theme_resources.grd
@@ -210,7 +210,6 @@
<include name="IDR_LOCATION_BAR_SELECTED_KEYWORD_BACKGROUND_C" file="keyword_search_bubble_c.png" type="BINDATA" />
<include name="IDR_LOCATION_BAR_SELECTED_KEYWORD_BACKGROUND_L" file="keyword_search_bubble_l.png" type="BINDATA" />
<include name="IDR_LOCATION_BAR_SELECTED_KEYWORD_BACKGROUND_R" file="keyword_search_bubble_r.png" type="BINDATA" />
- <include name="IDR_MATCH_PREVIEW_TEAR" file="match_preview_tear.png" type="BINDATA" />
<include name="IDR_MAXIMIZE_BUTTON_MASK" file="maximize_button_mask.png" type="BINDATA" />
<include name="IDR_MINIMIZE_BUTTON_MASK" file="minimize_button_mask.png" type="BINDATA" />
<include name="IDR_NEWTAB_BUTTON" file="newtab.png" type="BINDATA" />
diff --git a/chrome/browser/cocoa/previewable_contents_controller.h b/chrome/browser/cocoa/previewable_contents_controller.h
index 9b9b775..c4cc84e 100644
--- a/chrome/browser/cocoa/previewable_contents_controller.h
+++ b/chrome/browser/cocoa/previewable_contents_controller.h
@@ -26,9 +26,6 @@ class TabContents;
// Container view for the "active" contents.
IBOutlet NSView* activeContainer_;
- // The close preview button.
- IBOutlet NSButton* closeButton_;
-
// The preview TabContents. Will be NULL if no preview is currently showing.
TabContents* previewContents_; // weak
}
@@ -45,9 +42,6 @@ class TabContents;
// Returns YES if the preview contents is currently showing.
- (BOOL)isShowingPreview;
-// Simply calls |-hidePreview|. Convenience method for use by the close button.
-- (IBAction)closePreview:(id)sender;
-
@end
#endif // CHROME_BROWSER_COCOA_PREVIEWABLE_CONTENTS_CONTROLLER_H_
diff --git a/chrome/browser/cocoa/previewable_contents_controller.mm b/chrome/browser/cocoa/previewable_contents_controller.mm
index fc738c4..8ce042d 100644
--- a/chrome/browser/cocoa/previewable_contents_controller.mm
+++ b/chrome/browser/cocoa/previewable_contents_controller.mm
@@ -8,12 +8,6 @@
#include "base/mac_util.h"
#include "chrome/browser/tab_contents/tab_contents.h"
-@interface PreviewableContentsController(PrivateMethods)
-// Shows or hides the "close preview" button. Adds the button to the view
-// hierarchy, if needed.
-- (void)showCloseButton:(BOOL)show;
-@end
-
@implementation PreviewableContentsController
@synthesize activeContainer = activeContainer_;
@@ -36,54 +30,23 @@
NSView* previewView = previewContents_->GetNativeView();
[previewView setFrame:[[self view] bounds]];
- // Hide the active container, add the preview contents, and show the tear
- // image.
+ // Hide the active container and add the preview contents.
[activeContainer_ setHidden:YES];
[[self view] addSubview:previewView];
- [self showCloseButton:YES];
}
- (void)hidePreview {
DCHECK(previewContents_);
- // Remove the preview contents, hide the tear image, and reshow the active
- // container.
- [self showCloseButton:NO];
+ // Remove the preview contents and reshow the active container.
[previewContents_->GetNativeView() removeFromSuperview];
[activeContainer_ setHidden:NO];
previewContents_ = nil;
}
-- (IBAction)closePreview:(id)sender {
- // Hiding right now leads to crashes.
- // TODO(rohitrao): Actually hide the preview.
-}
-
- (BOOL)isShowingPreview {
return previewContents_ != nil;
}
@end
-
-@implementation PreviewableContentsController(PrivateMethods)
-
-- (void)showCloseButton:(BOOL)show {
- if (!show) {
- [closeButton_ removeFromSuperview];
- return;
- }
-
- if ([closeButton_ superview])
- return; // Already in the view hierarchy.
-
- // Add the close button to the upper left corner.
- NSView* view = [self view];
- NSRect frame = [closeButton_ frame];
- frame.origin.x = NSMinX([view bounds]);
- frame.origin.y = NSMaxY([view bounds]) - NSHeight(frame);
- [closeButton_ setFrame:frame];
- [view addSubview:closeButton_];
-}
-
-@end
diff --git a/chrome/browser/cocoa/previewable_contents_controller_unittest.mm b/chrome/browser/cocoa/previewable_contents_controller_unittest.mm
index c72f113..85e5c09 100644
--- a/chrome/browser/cocoa/previewable_contents_controller_unittest.mm
+++ b/chrome/browser/cocoa/previewable_contents_controller_unittest.mm
@@ -11,16 +11,6 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
-@interface PreviewableContentsController (ExposedForTesting)
-- (NSButton*)closeButton;
-@end
-
-@implementation PreviewableContentsController (ExposedForTesting)
-- (NSButton*)closeButton {
- return closeButton_;
-}
-@end
-
namespace {
class PreviewableContentsControllerTest : public CocoaTest {
@@ -36,11 +26,6 @@ class PreviewableContentsControllerTest : public CocoaTest {
TEST_VIEW(PreviewableContentsControllerTest, [controller_ view])
-// Adds the view to a window and displays it.
-TEST_F(PreviewableContentsControllerTest, TestImagesLoadedProperly) {
- EXPECT_TRUE([[[controller_ closeButton] image] isValid]);
-}
-
// TODO(rohitrao): Test showing and hiding the preview. This may require
// changing the interface to take in a TabContentsView* instead of a
// TabContents*.
diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi
index d04b373..76008ef 100644
--- a/chrome/chrome_dll.gypi
+++ b/chrome/chrome_dll.gypi
@@ -258,7 +258,6 @@
'app/theme/menu_hierarchy_arrow.pdf',
'app/theme/menu_overflow_down.pdf',
'app/theme/menu_overflow_up.pdf',
- 'app/theme/match_preview_tear.png',
'app/theme/nav.pdf',
'app/theme/newtab.pdf',
'app/theme/newtab_h.pdf',