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

Side by Side Diff: chrome/browser/ui/views/fullscreen_exit_bubble_views.cc

Issue 8142026: Revert 104076 - Change std::wstring to string16 for views::Link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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) 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/fullscreen_exit_bubble_views.h" 5 #include "chrome/browser/ui/views/fullscreen_exit_bubble_views.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 29 matching lines...) Expand all
40 // Clickable hint text to show in the bubble. 40 // Clickable hint text to show in the bubble.
41 views::Link link_; 41 views::Link link_;
42 }; 42 };
43 43
44 FullscreenExitBubbleViews::FullscreenExitView::FullscreenExitView( 44 FullscreenExitBubbleViews::FullscreenExitView::FullscreenExitView(
45 FullscreenExitBubbleViews* bubble, 45 FullscreenExitBubbleViews* bubble,
46 const std::wstring& accelerator) { 46 const std::wstring& accelerator) {
47 link_.set_parent_owned(false); 47 link_.set_parent_owned(false);
48 #if !defined(OS_CHROMEOS) 48 #if !defined(OS_CHROMEOS)
49 link_.SetText( 49 link_.SetText(
50 l10n_util::GetStringFUTF16(IDS_EXIT_FULLSCREEN_MODE, 50 UTF16ToWide(l10n_util::GetStringFUTF16(IDS_EXIT_FULLSCREEN_MODE,
51 WideToUTF16(accelerator))); 51 WideToUTF16(accelerator))));
52 #else 52 #else
53 link_.SetText(l10n_util::GetStringUTF16(IDS_EXIT_FULLSCREEN_MODE)); 53 link_.SetText(
54 UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXIT_FULLSCREEN_MODE)));
54 #endif 55 #endif
55 link_.set_listener(bubble); 56 link_.set_listener(bubble);
56 link_.SetFont(ResourceBundle::GetSharedInstance().GetFont( 57 link_.SetFont(ResourceBundle::GetSharedInstance().GetFont(
57 ResourceBundle::LargeFont)); 58 ResourceBundle::LargeFont));
58 link_.SetNormalColor(SK_ColorWHITE); 59 link_.SetNormalColor(SK_ColorWHITE);
59 link_.SetHighlightedColor(SK_ColorWHITE); 60 link_.SetHighlightedColor(SK_ColorWHITE);
60 AddChildView(&link_); 61 AddChildView(&link_);
61 } 62 }
62 63
63 FullscreenExitBubbleViews::FullscreenExitView::~FullscreenExitView() { 64 FullscreenExitBubbleViews::FullscreenExitView::~FullscreenExitView() {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 205 }
205 // NOTE: don't use the bounds of the root_view_. On linux changing window 206 // NOTE: don't use the bounds of the root_view_. On linux changing window
206 // size is async. Instead we use the size of the screen. 207 // size is async. Instead we use the size of the screen.
207 gfx::Rect screen_bounds = gfx::Screen::GetMonitorAreaNearestWindow( 208 gfx::Rect screen_bounds = gfx::Screen::GetMonitorAreaNearestWindow(
208 root_view_->GetWidget()->GetNativeView()); 209 root_view_->GetWidget()->GetNativeView());
209 gfx::Point origin(screen_bounds.x() + 210 gfx::Point origin(screen_bounds.x() +
210 (screen_bounds.width() - size.width()) / 2, 211 (screen_bounds.width() - size.width()) / 2,
211 screen_bounds.y()); 212 screen_bounds.y());
212 return gfx::Rect(origin, size); 213 return gfx::Rect(origin, size);
213 } 214 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/first_run_search_engine_view.cc ('k') | chrome/browser/ui/views/global_error_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698