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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 case ExtensionInstalledBubble::OMNIBOX_KEYWORD: { | 216 case ExtensionInstalledBubble::OMNIBOX_KEYWORD: { |
217 flavors_ |= HOW_TO_USE | HOW_TO_MANAGE; | 217 flavors_ |= HOW_TO_USE | HOW_TO_MANAGE; |
218 key = base::UTF8ToUTF16(extensions::OmniboxInfo::GetKeyword(extension)); | 218 key = base::UTF8ToUTF16(extensions::OmniboxInfo::GetKeyword(extension)); |
219 break; | 219 break; |
220 } | 220 } |
221 case ExtensionInstalledBubble::GENERIC: { | 221 case ExtensionInstalledBubble::GENERIC: { |
222 break; | 222 break; |
223 } | 223 } |
224 default: { | 224 default: { |
225 // When adding a new bubble type, the flavor needs to be set. | 225 // When adding a new bubble type, the flavor needs to be set. |
226 COMPILE_ASSERT(ExtensionInstalledBubble::GENERIC == 3, | 226 static_assert(ExtensionInstalledBubble::GENERIC == 3, |
227 kBubbleTypeEnumHasChangedButNotThisSwitchStatement); | 227 "kBubbleType enum has changed, this switch statement must " |
| 228 "be updateed"); |
228 break; | 229 break; |
229 } | 230 } |
230 } | 231 } |
231 | 232 |
232 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 233 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
233 const gfx::FontList& font_list = | 234 const gfx::FontList& font_list = |
234 rb.GetFontList(ui::ResourceBundle::BaseFont); | 235 rb.GetFontList(ui::ResourceBundle::BaseFont); |
235 | 236 |
236 // Add the icon (for all flavors). | 237 // Add the icon (for all flavors). |
237 // Scale down to 43x43, but allow smaller icons (don't scale up). | 238 // Scale down to 43x43, but allow smaller icons (don't scale up). |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 if (bubble_.extension() && bubble_.type() == bubble_.PAGE_ACTION && | 618 if (bubble_.extension() && bubble_.type() == bubble_.PAGE_ACTION && |
618 !extensions::FeatureSwitch::extension_action_redesign()->IsEnabled()) { | 619 !extensions::FeatureSwitch::extension_action_redesign()->IsEnabled()) { |
619 BrowserView* browser_view = | 620 BrowserView* browser_view = |
620 BrowserView::GetBrowserViewForBrowser(bubble_.browser()); | 621 BrowserView::GetBrowserViewForBrowser(bubble_.browser()); |
621 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( | 622 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( |
622 extensions::ExtensionActionManager::Get(bubble_.browser()->profile())-> | 623 extensions::ExtensionActionManager::Get(bubble_.browser()->profile())-> |
623 GetPageAction(*bubble_.extension()), | 624 GetPageAction(*bubble_.extension()), |
624 false); // preview_enabled | 625 false); // preview_enabled |
625 } | 626 } |
626 } | 627 } |
OLD | NEW |