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

Side by Side Diff: chrome/browser/ui/extensions/extension_installed_bubble.cc

Issue 1572743002: Make sure bubbles in Views default to close before their RenderFrameHosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Clean up Created 4 years, 10 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/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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 bool ExtensionInstalledBubble::ShouldClose(BubbleCloseReason reason) const { 206 bool ExtensionInstalledBubble::ShouldClose(BubbleCloseReason reason) const {
207 // Installing an extension triggers a navigation event that should be ignored. 207 // Installing an extension triggers a navigation event that should be ignored.
208 return reason != BUBBLE_CLOSE_NAVIGATED; 208 return reason != BUBBLE_CLOSE_NAVIGATED;
209 } 209 }
210 210
211 std::string ExtensionInstalledBubble::GetName() const { 211 std::string ExtensionInstalledBubble::GetName() const {
212 return "ExtensionInstalled"; 212 return "ExtensionInstalled";
213 } 213 }
214 214
215 const content::RenderFrameHost* ExtensionInstalledBubble::OwningFrame() const {
216 return nullptr;
Peter Kasting 2016/02/06 04:13:08 I don't know anything about this bubble, so I just
hcarmona 2016/02/09 00:31:05 I worked on this bubble. Returning null is fine he
217 }
218
215 base::string16 ExtensionInstalledBubble::GetHowToUseDescription() const { 219 base::string16 ExtensionInstalledBubble::GetHowToUseDescription() const {
216 int message_id = 0; 220 int message_id = 0;
217 base::string16 extra; 221 base::string16 extra;
218 if (action_command_) 222 if (action_command_)
219 extra = action_command_->accelerator().GetShortcutText(); 223 extra = action_command_->accelerator().GetShortcutText();
220 224
221 switch (type_) { 225 switch (type_) {
222 case BROWSER_ACTION: 226 case BROWSER_ACTION:
223 message_id = extra.empty() ? IDS_EXTENSION_INSTALLED_BROWSER_ACTION_INFO : 227 message_id = extra.empty() ? IDS_EXTENSION_INSTALLED_BROWSER_ACTION_INFO :
224 IDS_EXTENSION_INSTALLED_BROWSER_ACTION_INFO_WITH_SHORTCUT; 228 IDS_EXTENSION_INSTALLED_BROWSER_ACTION_INFO_WITH_SHORTCUT;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 break; 292 break;
289 case OMNIBOX_KEYWORD: 293 case OMNIBOX_KEYWORD:
290 options_ |= HOW_TO_USE | HOW_TO_MANAGE; 294 options_ |= HOW_TO_USE | HOW_TO_MANAGE;
291 anchor_position_ = ANCHOR_OMNIBOX; 295 anchor_position_ = ANCHOR_OMNIBOX;
292 break; 296 break;
293 case GENERIC: 297 case GENERIC:
294 anchor_position_ = ANCHOR_APP_MENU; 298 anchor_position_ = ANCHOR_APP_MENU;
295 break; 299 break;
296 } 300 }
297 } 301 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698