| Index: chrome/browser/cocoa/toolbar_controller.mm
|
| ===================================================================
|
| --- chrome/browser/cocoa/toolbar_controller.mm (revision 43969)
|
| +++ chrome/browser/cocoa/toolbar_controller.mm (working copy)
|
| @@ -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 @@
|
| - (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 @@
|
| [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 @@
|
|
|
| }
|
|
|
| -- (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
|
|
|