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

Side by Side Diff: chrome/browser/ui/views/translate/translate_bubble_view.cc

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/master again, resolved conflicts Created 6 years, 7 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/views/translate/translate_bubble_view.h" 5 #include "chrome/browser/ui/views/translate/translate_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 254 }
255 255
256 void TranslateBubbleView::OnPerformAction(views::Combobox* combobox) { 256 void TranslateBubbleView::OnPerformAction(views::Combobox* combobox) {
257 HandleComboboxPerformAction(static_cast<ComboboxID>(combobox->id())); 257 HandleComboboxPerformAction(static_cast<ComboboxID>(combobox->id()));
258 } 258 }
259 259
260 void TranslateBubbleView::LinkClicked(views::Link* source, int event_flags) { 260 void TranslateBubbleView::LinkClicked(views::Link* source, int event_flags) {
261 HandleLinkClicked(static_cast<LinkID>(source->id())); 261 HandleLinkClicked(static_cast<LinkID>(source->id()));
262 } 262 }
263 263
264 void TranslateBubbleView::WebContentsDestroyed( 264 void TranslateBubbleView::WebContentsDestroyed() {
265 content::WebContents* web_contents) {
266 GetWidget()->CloseNow(); 265 GetWidget()->CloseNow();
267 } 266 }
268 267
269 TranslateBubbleModel::ViewState TranslateBubbleView::GetViewState() const { 268 TranslateBubbleModel::ViewState TranslateBubbleView::GetViewState() const {
270 return model_->GetViewState(); 269 return model_->GetViewState();
271 } 270 }
272 271
273 TranslateBubbleView::TranslateBubbleView( 272 TranslateBubbleView::TranslateBubbleView(
274 views::View* anchor_view, 273 views::View* anchor_view,
275 scoped_ptr<TranslateBubbleModel> model, 274 scoped_ptr<TranslateBubbleModel> model,
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 model_->ShouldAlwaysTranslate()); 765 model_->ShouldAlwaysTranslate());
767 } 766 }
768 767
769 base::string16 label; 768 base::string16 label;
770 if (model_->IsPageTranslatedInCurrentLanguages()) 769 if (model_->IsPageTranslatedInCurrentLanguages())
771 label = l10n_util::GetStringUTF16(IDS_DONE); 770 label = l10n_util::GetStringUTF16(IDS_DONE);
772 else 771 else
773 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT); 772 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT);
774 advanced_done_button_->SetText(label); 773 advanced_done_button_->SetText(label);
775 } 774 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698