| OLD | NEW |
| 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/extensions/extension_installed_bubble.h" | 5 #include "chrome/browser/ui/extensions/extension_installed_bubble.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 base::ThreadTaskRunnerHandle::Get()->PostTask( | 88 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 89 FROM_HERE, | 89 FROM_HERE, |
| 90 base::BindOnce(&ExtensionInstalledBubbleObserver::Initialize, | 90 base::BindOnce(&ExtensionInstalledBubbleObserver::Initialize, |
| 91 weak_factory_.GetWeakPtr())); | 91 weak_factory_.GetWeakPtr())); |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 | 94 |
| 95 void OnExtensionUnloaded( | 95 void OnExtensionUnloaded( |
| 96 content::BrowserContext* browser_context, | 96 content::BrowserContext* browser_context, |
| 97 const extensions::Extension* extension, | 97 const extensions::Extension* extension, |
| 98 extensions::UnloadedExtensionInfo::Reason reason) override { | 98 extensions::UnloadedExtensionReason reason) override { |
| 99 if (extension == bubble_->extension()) { | 99 if (extension == bubble_->extension()) { |
| 100 // Extension is going away. | 100 // Extension is going away. |
| 101 delete this; | 101 delete this; |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| 105 void Initialize() { | 105 void Initialize() { |
| 106 DCHECK(bubble_); | 106 DCHECK(bubble_); |
| 107 bubble_->Initialize(); | 107 bubble_->Initialize(); |
| 108 Show(); | 108 Show(); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 break; | 288 break; |
| 289 case OMNIBOX_KEYWORD: | 289 case OMNIBOX_KEYWORD: |
| 290 options_ |= HOW_TO_USE | HOW_TO_MANAGE; | 290 options_ |= HOW_TO_USE | HOW_TO_MANAGE; |
| 291 anchor_position_ = ANCHOR_OMNIBOX; | 291 anchor_position_ = ANCHOR_OMNIBOX; |
| 292 break; | 292 break; |
| 293 case GENERIC: | 293 case GENERIC: |
| 294 anchor_position_ = ANCHOR_APP_MENU; | 294 anchor_position_ = ANCHOR_APP_MENU; |
| 295 break; | 295 break; |
| 296 } | 296 } |
| 297 } | 297 } |
| OLD | NEW |