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

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

Issue 10162017: Re-reland Propagate OnNativeWidgetMove to delegate/observers, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge. Created 8 years, 8 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/i18n/rtl.h" 5 #include "base/i18n/rtl.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/extensions/bundle_installer.h" 7 #include "chrome/browser/extensions/bundle_installer.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/views/frame/browser_view.h" 9 #include "chrome/browser/ui/views/frame/browser_view.h"
10 #include "chrome/browser/ui/views/toolbar_view.h" 10 #include "chrome/browser/ui/views/toolbar_view.h"
(...skipping 25 matching lines...) Expand all
36 #if defined(CROS_FONTS_USING_BCI) 36 #if defined(CROS_FONTS_USING_BCI)
37 const int kHeadingFontSizeDelta = 0; 37 const int kHeadingFontSizeDelta = 0;
38 #else 38 #else
39 const int kHeadingFontSizeDelta = 1; 39 const int kHeadingFontSizeDelta = 1;
40 #endif 40 #endif
41 41
42 class BundleInstalledBubble : public views::BubbleDelegateView, 42 class BundleInstalledBubble : public views::BubbleDelegateView,
43 public views::ButtonListener { 43 public views::ButtonListener {
44 public: 44 public:
45 BundleInstalledBubble(const BundleInstaller* bundle, 45 BundleInstalledBubble(const BundleInstaller* bundle,
46 Browser* browser) { 46 View* anchor_view,
47 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); 47 views::BubbleBorder::ArrowLocation arrow_location)
48 48 : views::BubbleDelegateView(anchor_view, arrow_location) {
49 set_anchor_view(browser_view->GetToolbarView()->app_menu());
50 set_arrow_location(views::BubbleBorder::TOP_RIGHT);
51
52 GridLayout* layout = GridLayout::CreatePanel(this); 49 GridLayout* layout = GridLayout::CreatePanel(this);
53 SetLayoutManager(layout); 50 SetLayoutManager(layout);
54 views::ColumnSet* column_set = layout->AddColumnSet(kColumnSetId); 51 views::ColumnSet* column_set = layout->AddColumnSet(kColumnSetId);
55 52
56 column_set->AddColumn(GridLayout::LEADING, 53 column_set->AddColumn(GridLayout::LEADING,
57 GridLayout::FILL, 54 GridLayout::FILL,
58 0, // no resizing 55 0, // no resizing
59 GridLayout::USE_PREF, 56 GridLayout::USE_PREF,
60 0, // no fixed with 57 0, // no fixed with
61 kLeftColumnWidth); 58 kLeftColumnWidth);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 StartFade(false); 156 StartFade(false);
160 } 157 }
161 158
162 DISALLOW_COPY_AND_ASSIGN(BundleInstalledBubble); 159 DISALLOW_COPY_AND_ASSIGN(BundleInstalledBubble);
163 }; 160 };
164 161
165 } // namespace 162 } // namespace
166 163
167 void BundleInstaller::ShowInstalledBubble( 164 void BundleInstaller::ShowInstalledBubble(
168 const BundleInstaller* bundle, Browser* browser) { 165 const BundleInstaller* bundle, Browser* browser) {
169 new BundleInstalledBubble(bundle, browser); 166 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser);
167 views::View* anchor = browser_view->GetToolbarView()->app_menu();
168 new BundleInstalledBubble(bundle, anchor, views::BubbleBorder::TOP_RIGHT);
170 } 169 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/critical_notification_bubble_view.cc ('k') | chrome/browser/ui/views/extensions/extension_popup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698