Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3032)

Unified Diff: chrome/browser/ui/views/extensions/extension_installed_bubble.cc

Issue 8870003: Merge BorderContentsView into BubbleFrameView; simplify. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/extensions/extension_installed_bubble.cc
diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
index 8e9a1ca8648cef248d09759c9606d34f7fb4af60..e53203f3e64f4588c280ec863ac4bd5b346cb910 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
@@ -390,6 +390,8 @@ void ExtensionInstalledBubble::ShowInternal() {
reference_view = browser_view->GetToolbarView()->app_menu();
set_anchor_view(reference_view);
+ set_arrow_location(type_ == OMNIBOX_KEYWORD ? views::BubbleBorder::TOP_LEFT :
+ views::BubbleBorder::TOP_RIGHT);
SetLayoutManager(new views::FillLayout());
AddChildView(
new InstalledBubbleContent(browser_, extension_, type_, &icon_, this));
@@ -403,19 +405,12 @@ gfx::Rect ExtensionInstalledBubble::GetAnchorRect() {
if (type_ == OMNIBOX_KEYWORD) {
LocationBarView* location_bar_view =
BrowserView::GetBrowserViewForBrowser(browser_)->GetLocationBarView();
- return gfx::Rect(location_bar_view->GetLocationEntryOrigin().Add(
- gfx::Point(0, location_bar_view->location_entry_view()->height())),
- gfx::Size());
+ return gfx::Rect(location_bar_view->GetLocationEntryOrigin(),
+ gfx::Size(0, location_bar_view->location_entry_view()->height()));
}
return views::BubbleDelegateView::GetAnchorRect();
}
-views::BubbleBorder::ArrowLocation
- ExtensionInstalledBubble::GetArrowLocation() const {
- return type_ == OMNIBOX_KEYWORD ? views::BubbleBorder::TOP_LEFT :
- views::BubbleBorder::TOP_RIGHT;
-}
-
void ExtensionInstalledBubble::WindowClosing() {
if (extension_ && type_ == PAGE_ACTION) {
BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_);
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_installed_bubble.h ('k') | chrome/browser/ui/views/first_run_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698