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

Side by Side Diff: chrome/browser/ui/intents/web_intent_picker_controller.cc

Issue 10832332: [WebIntents] Fix for default service crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/intents/web_intent_picker_controller.h" 5 #include "chrome/browser/ui/intents/web_intent_picker_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 DCHECK(dialog_state_ == kPickerWaiting); 865 DCHECK(dialog_state_ == kPickerWaiting);
866 break; 866 break;
867 867
868 case kPickerMain: 868 case kPickerMain:
869 // No DCHECK - main state can be reached from any state. 869 // No DCHECK - main state can be reached from any state.
870 // Ready to display data. 870 // Ready to display data.
871 picker_model_->SetWaitingForSuggestions(false); 871 picker_model_->SetWaitingForSuggestions(false);
872 break; 872 break;
873 873
874 case kPickerHidden: 874 case kPickerHidden:
875 // Once the picker dialog is closed, abandon all pending callbacks.
876 weak_ptr_factory_.InvalidateWeakPtrs();
875 break; 877 break;
876 878
877 default: 879 default:
878 NOTREACHED(); 880 NOTREACHED();
879 break; 881 break;
880 882
881 } 883 }
882 884
883 dialog_state_ = state; 885 dialog_state_ = state;
884 886
(...skipping 10 matching lines...) Expand all
895 picker_->SetActionString(GetIntentActionString( 897 picker_->SetActionString(GetIntentActionString(
896 UTF16ToUTF8(picker_model_->action()))); 898 UTF16ToUTF8(picker_model_->action())));
897 picker_shown_ = true; 899 picker_shown_ = true;
898 } 900 }
899 901
900 void WebIntentPickerController::ClosePicker() { 902 void WebIntentPickerController::ClosePicker() {
901 SetDialogState(kPickerHidden); 903 SetDialogState(kPickerHidden);
902 if (picker_) 904 if (picker_)
903 picker_->Close(); 905 picker_->Close();
904 } 906 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698