| OLD | NEW |
| 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_cocoa.h" | 5 #import "chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.h" |
| 6 | 6 |
| 7 #include "base/mac/scoped_block.h" | 7 #include "base/mac/scoped_block.h" |
| 8 #include "chrome/browser/ui/browser_finder.h" | 8 #include "chrome/browser/ui/browser_finder.h" |
| 9 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 9 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 10 #include "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" | 10 #include "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" |
| 11 #include "chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h" | 11 #include "chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h" |
| 12 #import "chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_controller.h" | 12 #import "chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.h" |
| 13 #include "chrome/browser/ui/passwords/manage_passwords_icon.h" | 13 #include "chrome/browser/ui/passwords/manage_passwords_icon.h" |
| 14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 15 | 15 |
| 16 typedef void (^Callback)(void); | 16 typedef void (^Callback)(void); |
| 17 | 17 |
| 18 @interface ManagePasswordsBubbleCocoaNotificationBridge : NSObject { | 18 @interface ManagePasswordsBubbleCocoaNotificationBridge : NSObject { |
| 19 base::mac::ScopedBlock<Callback> callback_; | 19 base::mac::ScopedBlock<Callback> callback_; |
| 20 } | 20 } |
| 21 - (id)initWithCallback:(Callback)callback; | 21 - (id)initWithCallback:(Callback)callback; |
| 22 - (void)onClose; | 22 - (void)onClose; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } | 115 } |
| 116 BrowserWindowController* bwc = | 116 BrowserWindowController* bwc = |
| 117 [BrowserWindowController browserWindowControllerForWindow:window]; | 117 [BrowserWindowController browserWindowControllerForWindow:window]; |
| 118 bubble_ = new ManagePasswordsBubbleCocoa( | 118 bubble_ = new ManagePasswordsBubbleCocoa( |
| 119 webContents, user_action ? ManagePasswordsBubbleModel::USER_ACTION | 119 webContents, user_action ? ManagePasswordsBubbleModel::USER_ACTION |
| 120 : ManagePasswordsBubbleModel::AUTOMATIC, | 120 : ManagePasswordsBubbleModel::AUTOMATIC, |
| 121 [bwc locationBarBridge]->manage_passwords_decoration()->icon()); | 121 [bwc locationBarBridge]->manage_passwords_decoration()->icon()); |
| 122 | 122 |
| 123 bubble_->Show(user_action); | 123 bubble_->Show(user_action); |
| 124 } | 124 } |
| OLD | NEW |