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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc

Issue 1921153002: Fix crash in extension installed bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« 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 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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/metrics/user_metrics_action.h" 10 #include "base/metrics/user_metrics_action.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 void ExtensionInstalledBubbleView::ButtonPressed(views::Button* sender, 263 void ExtensionInstalledBubbleView::ButtonPressed(views::Button* sender,
264 const ui::Event& event) { 264 const ui::Event& event) {
265 DCHECK_EQ(sender, close_); 265 DCHECK_EQ(sender, close_);
266 CloseBubble(); 266 CloseBubble();
267 } 267 }
268 268
269 void ExtensionInstalledBubbleView::LinkClicked(views::Link* source, 269 void ExtensionInstalledBubbleView::LinkClicked(views::Link* source,
270 int event_flags) { 270 int event_flags) {
271 DCHECK_EQ(manage_shortcut_, source); 271 DCHECK_EQ(manage_shortcut_, source);
272 CloseBubble();
273 272
274 std::string configure_url = chrome::kChromeUIExtensionsURL; 273 std::string configure_url = chrome::kChromeUIExtensionsURL;
275 configure_url += chrome::kExtensionConfigureCommandsSubPage; 274 configure_url += chrome::kExtensionConfigureCommandsSubPage;
276 chrome::NavigateParams params( 275 chrome::NavigateParams params(
277 chrome::GetSingletonTabNavigateParams(browser(), GURL(configure_url))); 276 chrome::GetSingletonTabNavigateParams(browser(), GURL(configure_url)));
278 chrome::Navigate(&params); 277 chrome::Navigate(&params);
278 CloseBubble();
279 } 279 }
280 280
281 void ExtensionInstalledBubbleView::Init() { 281 void ExtensionInstalledBubbleView::Init() {
282 UpdateAnchorView(); 282 UpdateAnchorView();
283 283
284 // The Extension Installed bubble takes on various forms, depending on the 284 // The Extension Installed bubble takes on various forms, depending on the
285 // type of extension installed. In general, though, they are all similar: 285 // type of extension installed. In general, though, they are all similar:
286 // 286 //
287 // ------------------------- 287 // -------------------------
288 // | | Heading [X] | 288 // | | Heading [X] |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 ->browser_actions(); 451 ->browser_actions();
452 return !container->animating(); 452 return !container->animating();
453 } 453 }
454 return true; 454 return true;
455 } 455 }
456 456
457 // Implemented here to create the platform specific instance of the BubbleUi. 457 // Implemented here to create the platform specific instance of the BubbleUi.
458 std::unique_ptr<BubbleUi> ExtensionInstalledBubble::BuildBubbleUi() { 458 std::unique_ptr<BubbleUi> ExtensionInstalledBubble::BuildBubbleUi() {
459 return base::WrapUnique(new ExtensionInstalledBubbleUi(this)); 459 return base::WrapUnique(new ExtensionInstalledBubbleUi(this));
460 } 460 }
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