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

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: Remove allow_bubble_offscreen, simplify and update tests. 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 3a39fba74f3b9ea76e5ddcfdc4ab8c3ea5f70f2f..abeed3e0396d6919da3030b58868499f3dd0ed09 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_);

Powered by Google App Engine
This is Rietveld 408576698