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

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

Issue 24012002: Move Range code to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: d Created 7 years, 3 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 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 line->GetStringSize().height()); 365 line->GetStringSize().height());
366 line->SetDisplayRect(gfx::Rect(position, size)); 366 line->SetDisplayRect(gfx::Rect(position, size));
367 position.set_y(position.y() + size.height()); 367 position.set_y(position.y() + size.height());
368 sign_in_promo_lines_.push_back(line); 368 sign_in_promo_lines_.push_back(line);
369 height += size.height(); 369 height += size.height();
370 } 370 }
371 371
372 // The link is drawn separately; make it transparent here to only draw once. 372 // The link is drawn separately; make it transparent here to only draw once.
373 // The link always leads other text and is assumed to fit on the first line. 373 // The link always leads other text and is assumed to fit on the first line.
374 sign_in_promo_lines_.front()->ApplyColor(SK_ColorTRANSPARENT, 374 sign_in_promo_lines_.front()->ApplyColor(SK_ColorTRANSPARENT,
375 ui::Range(0, signin_promo_link_text_.size())); 375 gfx::Range(0, signin_promo_link_text_.size()));
376 376
377 return height; 377 return height;
378 } 378 }
379 379
380 virtual gfx::Size GetPreferredSize() OVERRIDE { 380 virtual gfx::Size GetPreferredSize() OVERRIDE {
381 int width = kHorizOuterMargin; 381 int width = kHorizOuterMargin;
382 width += kIconSize; 382 width += kIconSize;
383 width += views::kPanelHorizMargin; 383 width += views::kPanelHorizMargin;
384 width += kRightColumnWidth; 384 width += kRightColumnWidth;
385 width += 2 * views::kPanelHorizMargin; 385 width += 2 * views::kPanelHorizMargin;
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 void ExtensionInstalledBubbleView::WindowClosing() { 607 void ExtensionInstalledBubbleView::WindowClosing() {
608 if (bubble_.extension() && bubble_.type() == bubble_.PAGE_ACTION) { 608 if (bubble_.extension() && bubble_.type() == bubble_.PAGE_ACTION) {
609 BrowserView* browser_view = 609 BrowserView* browser_view =
610 BrowserView::GetBrowserViewForBrowser(bubble_.browser()); 610 BrowserView::GetBrowserViewForBrowser(bubble_.browser());
611 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( 611 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction(
612 extensions::ExtensionActionManager::Get(bubble_.browser()->profile())-> 612 extensions::ExtensionActionManager::Get(bubble_.browser()->profile())->
613 GetPageAction(*bubble_.extension()), 613 GetPageAction(*bubble_.extension()),
614 false); // preview_enabled 614 false); // preview_enabled
615 } 615 }
616 } 616 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698