OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "chrome/browser/ui/views/extensions/extension_installed_bubble.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 MessageLoopForUI::current()->PostDelayedTask( | 308 MessageLoopForUI::current()->PostDelayedTask( |
309 FROM_HERE, NewRunnableMethod(this, | 309 FROM_HERE, NewRunnableMethod(this, |
310 &ExtensionInstalledBubble::ShowInternal), kAnimationWaitTime); | 310 &ExtensionInstalledBubble::ShowInternal), kAnimationWaitTime); |
311 return; | 311 return; |
312 } | 312 } |
313 reference_view = container->GetBrowserActionView( | 313 reference_view = container->GetBrowserActionView( |
314 extension_->browser_action()); | 314 extension_->browser_action()); |
315 // If the view is not visible then it is in the chevron, so point the | 315 // If the view is not visible then it is in the chevron, so point the |
316 // install bubble to the chevron instead. If this is an incognito window, | 316 // install bubble to the chevron instead. If this is an incognito window, |
317 // both could be invisible. | 317 // both could be invisible. |
318 if (!reference_view || !reference_view->IsVisible()) { | 318 if (!reference_view || !reference_view->visible()) { |
319 reference_view = container->chevron(); | 319 reference_view = container->chevron(); |
320 if (!reference_view || !reference_view->IsVisible()) | 320 if (!reference_view || !reference_view->visible()) |
321 reference_view = NULL; // fall back to app menu below. | 321 reference_view = NULL; // fall back to app menu below. |
322 } | 322 } |
323 } else if (type_ == PAGE_ACTION) { | 323 } else if (type_ == PAGE_ACTION) { |
324 LocationBarView* location_bar_view = browser_view->GetLocationBarView(); | 324 LocationBarView* location_bar_view = browser_view->GetLocationBarView(); |
325 location_bar_view->SetPreviewEnabledPageAction(extension_->page_action(), | 325 location_bar_view->SetPreviewEnabledPageAction(extension_->page_action(), |
326 true); // preview_enabled | 326 true); // preview_enabled |
327 reference_view = location_bar_view->GetPageActionView( | 327 reference_view = location_bar_view->GetPageActionView( |
328 extension_->page_action()); | 328 extension_->page_action()); |
329 DCHECK(reference_view); | 329 DCHECK(reference_view); |
330 } else if (type_ == OMNIBOX_KEYWORD) { | 330 } else if (type_ == OMNIBOX_KEYWORD) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 Release(); // Balanced in ctor. | 372 Release(); // Balanced in ctor. |
373 } | 373 } |
374 | 374 |
375 bool ExtensionInstalledBubble::CloseOnEscape() { | 375 bool ExtensionInstalledBubble::CloseOnEscape() { |
376 return true; | 376 return true; |
377 } | 377 } |
378 | 378 |
379 bool ExtensionInstalledBubble::FadeInOnShow() { | 379 bool ExtensionInstalledBubble::FadeInOnShow() { |
380 return true; | 380 return true; |
381 } | 381 } |
OLD | NEW |