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

Side by Side Diff: chrome/browser/ui/translate/translate_bubble_model_impl.cc

Issue 1550053002: Convert Pass()→std::move() in //chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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/translate/translate_bubble_model_impl.h" 5 #include "chrome/browser/ui/translate/translate_bubble_model_impl.h"
6 6
7 #include <utility>
8
7 #include "chrome/browser/translate/chrome_translate_client.h" 9 #include "chrome/browser/translate/chrome_translate_client.h"
8 #include "components/translate/core/browser/language_state.h" 10 #include "components/translate/core/browser/language_state.h"
9 #include "components/translate/core/browser/translate_ui_delegate.h" 11 #include "components/translate/core/browser/translate_ui_delegate.h"
10 12
11 TranslateBubbleModelImpl::TranslateBubbleModelImpl( 13 TranslateBubbleModelImpl::TranslateBubbleModelImpl(
12 translate::TranslateStep step, 14 translate::TranslateStep step,
13 scoped_ptr<translate::TranslateUIDelegate> ui_delegate) 15 scoped_ptr<translate::TranslateUIDelegate> ui_delegate)
14 : ui_delegate_(ui_delegate.Pass()), 16 : ui_delegate_(std::move(ui_delegate)),
15 view_state_transition_(TranslateStepToViewState(step)) { 17 view_state_transition_(TranslateStepToViewState(step)) {}
16 }
17 18
18 TranslateBubbleModelImpl::~TranslateBubbleModelImpl() { 19 TranslateBubbleModelImpl::~TranslateBubbleModelImpl() {
19 } 20 }
20 21
21 // static 22 // static
22 TranslateBubbleModel::ViewState 23 TranslateBubbleModel::ViewState
23 TranslateBubbleModelImpl::TranslateStepToViewState( 24 TranslateBubbleModelImpl::TranslateStepToViewState(
24 translate::TranslateStep step) { 25 translate::TranslateStep step) {
25 switch (step) { 26 switch (step) {
26 case translate::TRANSLATE_STEP_BEFORE_TRANSLATE: 27 case translate::TRANSLATE_STEP_BEFORE_TRANSLATE:
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 109 }
109 110
110 bool TranslateBubbleModelImpl::IsPageTranslatedInCurrentLanguages() const { 111 bool TranslateBubbleModelImpl::IsPageTranslatedInCurrentLanguages() const {
111 const translate::LanguageState& language_state = 112 const translate::LanguageState& language_state =
112 ui_delegate_->GetLanguageState(); 113 ui_delegate_->GetLanguageState();
113 return ui_delegate_->GetOriginalLanguageCode() == 114 return ui_delegate_->GetOriginalLanguageCode() ==
114 language_state.original_language() && 115 language_state.original_language() &&
115 ui_delegate_->GetTargetLanguageCode() == 116 ui_delegate_->GetTargetLanguageCode() ==
116 language_state.current_language(); 117 language_state.current_language();
117 } 118 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_actions_model.cc ('k') | chrome/browser/ui/views/app_list/app_list_dialog_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698