| 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 <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 Loading... |
| 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(¶ms); | 277 chrome::Navigate(¶ms); |
| 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 Loading... |
| 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 } |
| OLD | NEW |