Index: chrome/browser/ui/cocoa/location_bar/search_button_decoration.mm |
diff --git a/chrome/browser/ui/cocoa/location_bar/search_button_decoration.mm b/chrome/browser/ui/cocoa/location_bar/search_button_decoration.mm |
deleted file mode 100644 |
index 18785c24a80f5e4f9d918d880b6e26d3d5fe1f52..0000000000000000000000000000000000000000 |
--- a/chrome/browser/ui/cocoa/location_bar/search_button_decoration.mm |
+++ /dev/null |
@@ -1,53 +0,0 @@ |
-// Copyright 2013 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#import "chrome/browser/ui/cocoa/location_bar/search_button_decoration.h" |
- |
-#import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" |
-#import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" |
-#include "grit/theme_resources.h" |
- |
-namespace { |
- |
-const CGFloat kInnerPadding = 16; |
-const CGFloat kLeftPadding = 3; |
- |
-} // namespace |
- |
-SearchButtonDecoration::SearchButtonDecoration(LocationBarViewMac* owner) |
- : ButtonDecoration(IMAGE_GRID(IDR_OMNIBOX_SEARCH_BUTTON), |
- IDR_OMNIBOX_SEARCH_BUTTON_LOUPE, |
- IMAGE_GRID(IDR_OMNIBOX_SEARCH_BUTTON_HOVER), |
- IDR_OMNIBOX_SEARCH_BUTTON_LOUPE, |
- IMAGE_GRID(IDR_OMNIBOX_SEARCH_BUTTON_PRESSED), |
- IDR_OMNIBOX_SEARCH_BUTTON_LOUPE, |
- kInnerPadding), |
- owner_(owner) { |
- DCHECK(owner_); |
-} |
- |
-SearchButtonDecoration::~SearchButtonDecoration() { |
-} |
- |
-CGFloat SearchButtonDecoration::GetWidthForSpace(CGFloat width) { |
- CGFloat width_for_space = ButtonDecoration::GetWidthForSpace(width); |
- if (width_for_space == kOmittedWidth || |
- width_for_space + kLeftPadding > width) |
- return kOmittedWidth; |
- return width_for_space + kLeftPadding; |
-} |
- |
-void SearchButtonDecoration::DrawInFrame(NSRect frame, NSView* control_view) { |
- frame = NSMakeRect(NSMinX(frame) + kLeftPadding, |
- NSMinY(frame), |
- NSWidth(frame) - kLeftPadding, |
- NSHeight(frame)); |
- ButtonDecoration::DrawInFrame(frame, control_view); |
-} |
- |
-bool SearchButtonDecoration::OnMousePressed(NSRect frame, NSPoint location) { |
- owner_->GetOmniboxView()->model()->AcceptInput( |
- owner_->GetWindowOpenDisposition(), false); |
- return true; |
-} |