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

Side by Side Diff: chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_controller.mm

Issue 563093003: Fix Mac password bubble crash due to the "nope" menu hanging around. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import "chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_controller.h"
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 8 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
9 #import "chrome/browser/ui/cocoa/info_bubble_view.h" 9 #import "chrome/browser/ui/cocoa/info_bubble_view.h"
10 #import "chrome/browser/ui/cocoa/info_bubble_window.h" 10 #import "chrome/browser/ui/cocoa/info_bubble_window.h"
(...skipping 24 matching lines...) Expand all
35 [self updateState]; 35 [self updateState];
36 } 36 }
37 return self; 37 return self;
38 } 38 }
39 39
40 - (void)showWindow:(id)sender { 40 - (void)showWindow:(id)sender {
41 [self performLayout]; 41 [self performLayout];
42 [super showWindow:sender]; 42 [super showWindow:sender];
43 } 43 }
44 44
45 - (void)close {
46 [currentController_ bubbleWillDisappear];
47 [super close];
48 }
49
45 - (void)updateState { 50 - (void)updateState {
46 // Find the next view controller. 51 // Find the next view controller.
47 currentController_.reset(); 52 currentController_.reset();
48 if (password_manager::ui::IsPendingState(model_->state())) { 53 if (password_manager::ui::IsPendingState(model_->state())) {
49 currentController_.reset( 54 currentController_.reset(
50 [[ManagePasswordsBubblePendingViewController alloc] 55 [[ManagePasswordsBubblePendingViewController alloc]
51 initWithModel:model_ 56 initWithModel:model_
52 delegate:self]); 57 delegate:self]);
53 } else if (model_->state() == password_manager::ui::CONFIRMATION_STATE) { 58 } else if (model_->state() == password_manager::ui::CONFIRMATION_STATE) {
54 currentController_.reset( 59 currentController_.reset(
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 127
123 @end 128 @end
124 129
125 @implementation ManagePasswordsBubbleController (Testing) 130 @implementation ManagePasswordsBubbleController (Testing)
126 131
127 - (NSViewController*)currentController { 132 - (NSViewController*)currentController {
128 return currentController_.get(); 133 return currentController_.get();
129 } 134 }
130 135
131 @end 136 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698