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

Side by Side Diff: ui/message_center/views/notifier_settings_view.cc

Issue 117983002: Prefix string16 with base:: in ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years 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 | « ui/message_center/views/notification_view.cc ('k') | ui/metro_viewer/ime_types.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/message_center/views/notifier_settings_view.h" 5 #include "ui/message_center/views/notifier_settings_view.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // showing 'icon'. 288 // showing 'icon'.
289 NotifierSettingsView::NotifierButton::NotifierButton( 289 NotifierSettingsView::NotifierButton::NotifierButton(
290 NotifierSettingsProvider* provider, 290 NotifierSettingsProvider* provider,
291 Notifier* notifier, 291 Notifier* notifier,
292 views::ButtonListener* listener) 292 views::ButtonListener* listener)
293 : views::CustomButton(listener), 293 : views::CustomButton(listener),
294 provider_(provider), 294 provider_(provider),
295 notifier_(notifier), 295 notifier_(notifier),
296 icon_view_(new views::ImageView()), 296 icon_view_(new views::ImageView()),
297 name_view_(new views::Label(notifier_->name)), 297 name_view_(new views::Label(notifier_->name)),
298 checkbox_(new views::Checkbox(string16())), 298 checkbox_(new views::Checkbox(base::string16())),
299 learn_more_(NULL) { 299 learn_more_(NULL) {
300 DCHECK(provider); 300 DCHECK(provider);
301 DCHECK(notifier); 301 DCHECK(notifier);
302 302
303 // Since there may never be an icon (but that could change at a later time), 303 // Since there may never be an icon (but that could change at a later time),
304 // we own the icon view here. 304 // we own the icon view here.
305 icon_view_->set_owned_by_client(); 305 icon_view_->set_owned_by_client();
306 306
307 checkbox_->SetChecked(notifier_->enabled); 307 checkbox_->SetChecked(notifier_->enabled);
308 checkbox_->set_listener(this); 308 checkbox_->set_listener(this);
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 top_label->SetMultiLine(true); 574 top_label->SetMultiLine(true);
575 top_label->set_border(views::Border::CreateEmptyBorder( 575 top_label->set_border(views::Border::CreateEmptyBorder(
576 0, 576 0,
577 settings::kTitleMargin + kMenuButtonInnateMargin, 577 settings::kTitleMargin + kMenuButtonInnateMargin,
578 0, 578 0,
579 settings::kTitleMargin + kMenuButtonInnateMargin)); 579 settings::kTitleMargin + kMenuButtonInnateMargin));
580 contents_title_view->AddChildView(top_label); 580 contents_title_view->AddChildView(top_label);
581 581
582 if (need_account_switcher) { 582 if (need_account_switcher) {
583 const NotifierGroup& active_group = provider_->GetActiveNotifierGroup(); 583 const NotifierGroup& active_group = provider_->GetActiveNotifierGroup();
584 string16 notifier_group_text = active_group.login_info.empty() ? 584 base::string16 notifier_group_text = active_group.login_info.empty() ?
585 active_group.name : active_group.login_info; 585 active_group.name : active_group.login_info;
586 notifier_group_selector_ = 586 notifier_group_selector_ =
587 new views::MenuButton(NULL, notifier_group_text, this, true); 587 new views::MenuButton(NULL, notifier_group_text, this, true);
588 scoped_ptr<views::TextButtonDefaultBorder> selector_border( 588 scoped_ptr<views::TextButtonDefaultBorder> selector_border(
589 new views::TextButtonDefaultBorder()); 589 new views::TextButtonDefaultBorder());
590 ui::ResourceBundle* rb = &ResourceBundle::GetSharedInstance(); 590 ui::ResourceBundle* rb = &ResourceBundle::GetSharedInstance();
591 gfx::Insets painter_insets(kButtonPainterInsets, kButtonPainterInsets, 591 gfx::Insets painter_insets(kButtonPainterInsets, kButtonPainterInsets,
592 kButtonPainterInsets, kButtonPainterInsets); 592 kButtonPainterInsets, kButtonPainterInsets);
593 selector_border->set_normal_painter(views::Painter::CreateImagePainter( 593 selector_border->set_normal_painter(views::Painter::CreateImagePainter(
594 *rb->GetImageSkiaNamed(IDR_BUTTON_NORMAL), painter_insets)); 594 *rb->GetImageSkiaNamed(IDR_BUTTON_NORMAL), painter_insets));
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 menu_anchor, 720 menu_anchor,
721 views::MenuItemView::BUBBLE_ABOVE, 721 views::MenuItemView::BUBBLE_ABOVE,
722 ui::MENU_SOURCE_MOUSE, 722 ui::MENU_SOURCE_MOUSE,
723 views::MenuRunner::CONTEXT_MENU)) 723 views::MenuRunner::CONTEXT_MENU))
724 return; 724 return;
725 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); 725 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent());
726 center_view->OnSettingsChanged(); 726 center_view->OnSettingsChanged();
727 } 727 }
728 728
729 } // namespace message_center 729 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/notification_view.cc ('k') | ui/metro_viewer/ime_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698