| 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/views/extensions/extension_installed_bubble_view.h" | 5 #include "chrome/browser/ui/views/extensions/extension_installed_bubble_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 void InstalledBubbleContent::ButtonPressed(views::Button* sender, | 279 void InstalledBubbleContent::ButtonPressed(views::Button* sender, |
| 280 const ui::Event& event) { | 280 const ui::Event& event) { |
| 281 DCHECK_EQ(sender, close_button_); | 281 DCHECK_EQ(sender, close_button_); |
| 282 GetWidget()->Close(); | 282 GetWidget()->Close(); |
| 283 } | 283 } |
| 284 | 284 |
| 285 void InstalledBubbleContent::LinkClicked(views::Link* source, int event_flags) { | 285 void InstalledBubbleContent::LinkClicked(views::Link* source, int event_flags) { |
| 286 GetWidget()->Close(); | 286 GetWidget()->Close(); |
| 287 | 287 |
| 288 if (source == sign_in_link_) { | 288 if (source == sign_in_link_) { |
| 289 #if defined(OS_ANDROID) |
| 290 // TODO(bshe): Figure out what to do on Android platform. See |
| 291 // crbug.com/559340. |
| 292 NOTIMPLEMENTED(); |
| 293 #else |
| 289 chrome::ShowBrowserSignin( | 294 chrome::ShowBrowserSignin( |
| 290 browser_, signin_metrics::SOURCE_EXTENSION_INSTALL_BUBBLE); | 295 browser_, signin_metrics::SOURCE_EXTENSION_INSTALL_BUBBLE); |
| 296 #endif |
| 291 return; | 297 return; |
| 292 } | 298 } |
| 293 | 299 |
| 294 DCHECK_EQ(manage_shortcut_, source); | 300 DCHECK_EQ(manage_shortcut_, source); |
| 295 | 301 |
| 296 std::string configure_url = chrome::kChromeUIExtensionsURL; | 302 std::string configure_url = chrome::kChromeUIExtensionsURL; |
| 297 configure_url += chrome::kExtensionConfigureCommandsSubPage; | 303 configure_url += chrome::kExtensionConfigureCommandsSubPage; |
| 298 chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams( | 304 chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams( |
| 299 browser_, GURL(configure_url))); | 305 browser_, GURL(configure_url))); |
| 300 chrome::Navigate(¶ms); | 306 chrome::Navigate(¶ms); |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 if (bubble_->extension() && bubble_->type() == bubble_->PAGE_ACTION && | 561 if (bubble_->extension() && bubble_->type() == bubble_->PAGE_ACTION && |
| 556 !extensions::FeatureSwitch::extension_action_redesign()->IsEnabled()) { | 562 !extensions::FeatureSwitch::extension_action_redesign()->IsEnabled()) { |
| 557 BrowserView* browser_view = | 563 BrowserView* browser_view = |
| 558 BrowserView::GetBrowserViewForBrowser(bubble_->browser()); | 564 BrowserView::GetBrowserViewForBrowser(bubble_->browser()); |
| 559 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( | 565 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( |
| 560 extensions::ExtensionActionManager::Get(bubble_->browser()->profile()) | 566 extensions::ExtensionActionManager::Get(bubble_->browser()->profile()) |
| 561 ->GetPageAction(*bubble_->extension()), | 567 ->GetPageAction(*bubble_->extension()), |
| 562 false); // preview_enabled | 568 false); // preview_enabled |
| 563 } | 569 } |
| 564 } | 570 } |
| OLD | NEW |