summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/extension_installed_bubble_controller.mm
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-25 00:54:36 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-25 00:54:36 +0000
commit99edc98ac36d8efa403eb9b0a194d021cc22c192 (patch)
tree7d55aaaf9c93aef6f5c9d9a30cadba9315d100cf /chrome/browser/cocoa/extension_installed_bubble_controller.mm
parent10dd7531c0eace81434783ddb9b7c224dbe0e9f9 (diff)
downloadchromium_src-99edc98ac36d8efa403eb9b0a194d021cc22c192.zip
chromium_src-99edc98ac36d8efa403eb9b0a194d021cc22c192.tar.gz
chromium_src-99edc98ac36d8efa403eb9b0a194d021cc22c192.tar.bz2
[Mac] Find page-action bubble point from location bar.
Push the AutocompleteTextFieldCell knowledge into LocationBarViewMac. BUG=none TEST=none Review URL: http://codereview.chromium.org/2806031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50799 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/extension_installed_bubble_controller.mm')
-rw-r--r--chrome/browser/cocoa/extension_installed_bubble_controller.mm17
1 files changed, 3 insertions, 14 deletions
diff --git a/chrome/browser/cocoa/extension_installed_bubble_controller.mm b/chrome/browser/cocoa/extension_installed_bubble_controller.mm
index 15f1e72..2074b8e 100644
--- a/chrome/browser/cocoa/extension_installed_bubble_controller.mm
+++ b/chrome/browser/cocoa/extension_installed_bubble_controller.mm
@@ -9,7 +9,6 @@
#include "base/sys_string_conversions.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_window.h"
-#include "chrome/browser/cocoa/autocomplete_text_field_cell.h"
#include "chrome/browser/cocoa/browser_window_cocoa.h"
#include "chrome/browser/cocoa/browser_window_controller.h"
#include "chrome/browser/cocoa/extensions/browser_actions_controller.h"
@@ -151,7 +150,6 @@ class ExtensionLoadedNotificationObserver : public NotificationObserver {
locationBarView->SetPreviewEnabledPageAction(extension_->page_action(),
false); // disables preview.
- [locationBarView->GetAutocompleteTextField() setNeedsDisplay:YES];
}
// The extension installed bubble points at the browser action icon or the
@@ -185,18 +183,9 @@ class ExtensionLoadedNotificationObserver : public NotificationObserver {
true);
// Find the center of the bottom of the page action icon.
- AutocompleteTextField* field =
- locationBarView->GetAutocompleteTextField();
- size_t index =
- locationBarView->GetPageActionIndex(extension_->page_action());
- NSRect iconRect = [[field autocompleteTextFieldCell]
- pageActionFrameForIndex:index inFrame:[field bounds]];
- NSRect boundsrect = [[field superview] convertRect:iconRect
- toView:nil];
- NSRect fieldFrame = [field bounds];
- fieldFrame = [field convertRect:fieldFrame toView:nil];
- arrowPoint = NSMakePoint(fieldFrame.origin.x + NSMidX(boundsrect),
- NSMinY(boundsrect));
+ const NSRect frame =
+ locationBarView->GetPageActionFrame(extension_->page_action());
+ arrowPoint = NSMakePoint(NSMidX(frame), NSMinY(frame));
break;
}
default: {