| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_view.h" | 5 #include "chrome/browser/ui/views/extensions/extension_installed_bubble_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 } | 366 } |
| 367 | 367 |
| 368 // The link is drawn separately; make it transparent here to only draw once. | 368 // The link is drawn separately; make it transparent here to only draw once. |
| 369 // The link always leads other text and is assumed to fit on the first line. | 369 // The link always leads other text and is assumed to fit on the first line. |
| 370 sign_in_promo_lines_.front()->ApplyColor(SK_ColorTRANSPARENT, | 370 sign_in_promo_lines_.front()->ApplyColor(SK_ColorTRANSPARENT, |
| 371 gfx::Range(0, signin_promo_link_text_.size())); | 371 gfx::Range(0, signin_promo_link_text_.size())); |
| 372 | 372 |
| 373 return height; | 373 return height; |
| 374 } | 374 } |
| 375 | 375 |
| 376 virtual gfx::Size GetPreferredSize() OVERRIDE { | 376 virtual gfx::Size GetPreferredSize() const OVERRIDE { |
| 377 int width = kHorizOuterMargin; | 377 int width = kHorizOuterMargin; |
| 378 width += kIconSize; | 378 width += kIconSize; |
| 379 width += views::kPanelHorizMargin; | 379 width += views::kPanelHorizMargin; |
| 380 width += kRightColumnWidth; | 380 width += kRightColumnWidth; |
| 381 width += 2 * views::kPanelHorizMargin; | 381 width += 2 * views::kPanelHorizMargin; |
| 382 width += kHorizOuterMargin; | 382 width += kHorizOuterMargin; |
| 383 | 383 |
| 384 int height = kVertOuterMargin; | 384 int height = kVertOuterMargin; |
| 385 height += heading_->GetHeightForWidth(kRightColumnWidth); | 385 height += heading_->GetHeightForWidth(kRightColumnWidth); |
| 386 height += kVertInnerMargin; | 386 height += kVertInnerMargin; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 void ExtensionInstalledBubbleView::WindowClosing() { | 599 void ExtensionInstalledBubbleView::WindowClosing() { |
| 600 if (bubble_.extension() && bubble_.type() == bubble_.PAGE_ACTION) { | 600 if (bubble_.extension() && bubble_.type() == bubble_.PAGE_ACTION) { |
| 601 BrowserView* browser_view = | 601 BrowserView* browser_view = |
| 602 BrowserView::GetBrowserViewForBrowser(bubble_.browser()); | 602 BrowserView::GetBrowserViewForBrowser(bubble_.browser()); |
| 603 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( | 603 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( |
| 604 extensions::ExtensionActionManager::Get(bubble_.browser()->profile())-> | 604 extensions::ExtensionActionManager::Get(bubble_.browser()->profile())-> |
| 605 GetPageAction(*bubble_.extension()), | 605 GetPageAction(*bubble_.extension()), |
| 606 false); // preview_enabled | 606 false); // preview_enabled |
| 607 } | 607 } |
| 608 } | 608 } |
| OLD | NEW |