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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_installed_bubble.cc

Issue 8493011: Merge 108537 - Align avatar bubble with edge of anchor control (Closed) Base URL: svn://svn.chromium.org/chrome/branches/912/src/
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/bubble/bubble.cc ('k') | chrome/browser/ui/views/first_run_bubble.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/extensions/extension_installed_bubble.h" 5 #include "chrome/browser/ui/views/extensions/extension_installed_bubble.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 if (type_ == OMNIBOX_KEYWORD) { 401 if (type_ == OMNIBOX_KEYWORD) {
402 bounds.set_origin( 402 bounds.set_origin(
403 browser_view->GetLocationBarView()->GetLocationEntryOrigin()); 403 browser_view->GetLocationBarView()->GetLocationEntryOrigin());
404 bounds.set_width(0); 404 bounds.set_width(0);
405 arrow_location = views::BubbleBorder::TOP_LEFT; 405 arrow_location = views::BubbleBorder::TOP_LEFT;
406 } 406 }
407 407
408 bubble_content_ = new InstalledBubbleContent( 408 bubble_content_ = new InstalledBubbleContent(
409 browser_, extension_, type_, &icon_); 409 browser_, extension_, type_, &icon_);
410 Bubble* bubble = Bubble::Show(browser_view->GetWidget(), bounds, 410 Bubble* bubble = Bubble::Show(browser_view->GetWidget(), bounds,
411 arrow_location, bubble_content_, this); 411 arrow_location,
412 views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
413 bubble_content_, this);
412 bubble_content_->set_bubble(bubble); 414 bubble_content_->set_bubble(bubble);
413 } 415 }
414 416
415 // BubbleDelegate 417 // BubbleDelegate
416 void ExtensionInstalledBubble::BubbleClosing(Bubble* bubble, 418 void ExtensionInstalledBubble::BubbleClosing(Bubble* bubble,
417 bool closed_by_escape) { 419 bool closed_by_escape) {
418 if (extension_ && type_ == PAGE_ACTION) { 420 if (extension_ && type_ == PAGE_ACTION) {
419 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_); 421 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_);
420 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( 422 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction(
421 extension_->page_action(), 423 extension_->page_action(),
422 false); // preview_enabled 424 false); // preview_enabled
423 } 425 }
424 426
425 Release(); // Balanced in ctor. 427 Release(); // Balanced in ctor.
426 } 428 }
427 429
428 bool ExtensionInstalledBubble::CloseOnEscape() { 430 bool ExtensionInstalledBubble::CloseOnEscape() {
429 return true; 431 return true;
430 } 432 }
431 433
432 bool ExtensionInstalledBubble::FadeInOnShow() { 434 bool ExtensionInstalledBubble::FadeInOnShow() {
433 return true; 435 return true;
434 } 436 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bubble/bubble.cc ('k') | chrome/browser/ui/views/first_run_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698