summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/toolbar_controller.mm
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-12 18:57:03 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-12 18:57:03 +0000
commita2b35465c42e3bb3f85c22a869e0dce74b5d8a4c (patch)
treee800a3fd638bda7b597b8fd0b76af50d3d049ea5 /chrome/browser/cocoa/toolbar_controller.mm
parent5e49b2ce1dc358328ab732520b17414b44081712 (diff)
downloadchromium_src-a2b35465c42e3bb3f85c22a869e0dce74b5d8a4c.zip
chromium_src-a2b35465c42e3bb3f85c22a869e0dce74b5d8a4c.tar.gz
chromium_src-a2b35465c42e3bb3f85c22a869e0dce74b5d8a4c.tar.bz2
Shift omnibox dropdown in and up on Windows, and square off the top, so it connects to the location bar. Also fix info bubble positioning against location bar icons to put the arrow "up against the icon edge" (fixes the arrow overlapping some page action icons).
Remove BubblePositioner, which is now no longer needed. BUG=27570,40730 TEST=Omnibox dropdown should line up with editable area edges, icons and text should line up with icon and text in the omnibox. Info bubbles should still be positioned correctly Review URL: http://codereview.chromium.org/1578021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44268 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/toolbar_controller.mm')
-rw-r--r--chrome/browser/cocoa/toolbar_controller.mm36
1 files changed, 0 insertions, 36 deletions
diff --git a/chrome/browser/cocoa/toolbar_controller.mm b/chrome/browser/cocoa/toolbar_controller.mm
index a05c0e4..085c493 100644
--- a/chrome/browser/cocoa/toolbar_controller.mm
+++ b/chrome/browser/cocoa/toolbar_controller.mm
@@ -15,7 +15,6 @@
#include "chrome/browser/autocomplete/autocomplete_edit_view.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_window.h"
-#include "chrome/browser/bubble_positioner.h"
#import "chrome/browser/cocoa/autocomplete_text_field.h"
#import "chrome/browser/cocoa/autocomplete_text_field_editor.h"
#import "chrome/browser/cocoa/back_forward_menu_controller.h"
@@ -85,26 +84,6 @@ const CGFloat kAnimationDuration = 0.2;
- (void)adjustLocationAndGoPositionsBy:(CGFloat)dX animate:(BOOL)animate;
@end
-namespace {
-
-// A C++ class used to correctly position the omnibox.
-class BubblePositionerMac : public BubblePositioner {
- public:
- BubblePositionerMac(ToolbarController* controller)
- : controller_(controller) { }
- virtual ~BubblePositionerMac() { }
-
- // BubblePositioner:
- virtual gfx::Rect GetLocationStackBounds() const {
- return [controller_ locationStackBounds];
- }
-
- private:
- ToolbarController* controller_; // weak, owns us
-};
-
-} // namespace
-
namespace ToolbarControllerInternal {
// A C++ delegate that handles enabling/disabling menu items and handling when
@@ -231,9 +210,7 @@ class PrefObserverBridge : public NotificationObserver {
[wrenchButton_ setShowsBorderOnlyWhileMouseInside:YES];
[self initCommandStatus:commands_];
- bubblePositioner_.reset(new BubblePositionerMac(self));
locationBarView_.reset(new LocationBarViewMac(locationBar_,
- bubblePositioner_.get(),
commands_, toolbarModel_,
profile_, browser_));
[locationBar_ setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]];
@@ -820,19 +797,6 @@ class PrefObserverBridge : public NotificationObserver {
}
-- (gfx::Rect)locationStackBounds {
- // The field has a single-pixel border on the left and right. This
- // needs to be factored out so that the popup window's border (which
- // is outside the frame) lines up.
- const int kLocationStackEdgeWidth = 1;
-
- const NSRect locationFrame = [locationBar_ frame];
- gfx::Rect stack_bounds(
- NSRectToCGRect([[self view] convertRect:locationFrame toView:nil]));
- stack_bounds.Inset(kLocationStackEdgeWidth, 0);
- return stack_bounds;
-}
-
// (URLDropTargetController protocol)
- (void)dropURLs:(NSArray*)urls inView:(NSView*)view at:(NSPoint)point {
// TODO(viettrungluu): This code is more or less copied from the code in