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/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 5452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5463 GetSelectedTabContentsWrapper()->render_view_host()->ToggleSpeechInput(); | 5463 GetSelectedTabContentsWrapper()->render_view_host()->ToggleSpeechInput(); |
5464 } | 5464 } |
5465 | 5465 |
5466 void Browser::OnWindowDidShow() { | 5466 void Browser::OnWindowDidShow() { |
5467 if (window_has_shown_) | 5467 if (window_has_shown_) |
5468 return; | 5468 return; |
5469 window_has_shown_ = true; | 5469 window_has_shown_ = true; |
5470 | 5470 |
5471 // Suppress the first run bubble if we're showing the sync promo. | 5471 // Suppress the first run bubble if we're showing the sync promo. |
5472 TabContents* contents = GetSelectedTabContents(); | 5472 TabContents* contents = GetSelectedTabContents(); |
5473 bool is_showing_promo = | 5473 bool is_showing_promo = contents && |
5474 contents && contents->GetURL() == GURL(chrome::kChromeUISyncPromoURL); | 5474 contents->GetURL().SchemeIs(chrome::kChromeUIScheme) && |
| 5475 contents->GetURL().host() == chrome::kChromeUISyncPromoHost; |
5475 | 5476 |
5476 // Show the First Run information bubble if we've been told to. | 5477 // Show the First Run information bubble if we've been told to. |
5477 PrefService* local_state = g_browser_process->local_state(); | 5478 PrefService* local_state = g_browser_process->local_state(); |
5478 if (!is_showing_promo && local_state && | 5479 if (!is_showing_promo && local_state && |
5479 local_state->GetBoolean(prefs::kShouldShowFirstRunBubble)) { | 5480 local_state->GetBoolean(prefs::kShouldShowFirstRunBubble)) { |
5480 FirstRun::BubbleType bubble_type = FirstRun::LARGE_BUBBLE; | 5481 FirstRun::BubbleType bubble_type = FirstRun::LARGE_BUBBLE; |
5481 if (local_state-> | 5482 if (local_state-> |
5482 FindPreference(prefs::kShouldUseOEMFirstRunBubble) && | 5483 FindPreference(prefs::kShouldUseOEMFirstRunBubble) && |
5483 local_state->GetBoolean(prefs::kShouldUseOEMFirstRunBubble)) { | 5484 local_state->GetBoolean(prefs::kShouldUseOEMFirstRunBubble)) { |
5484 bubble_type = FirstRun::OEM_BUBBLE; | 5485 bubble_type = FirstRun::OEM_BUBBLE; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5521 } | 5522 } |
5522 | 5523 |
5523 void Browser::UpdateFullscreenExitBubbleContent() { | 5524 void Browser::UpdateFullscreenExitBubbleContent() { |
5524 GURL url; | 5525 GURL url; |
5525 if (fullscreened_tab_) | 5526 if (fullscreened_tab_) |
5526 url = fullscreened_tab_->tab_contents()->GetURL(); | 5527 url = fullscreened_tab_->tab_contents()->GetURL(); |
5527 | 5528 |
5528 window_->UpdateFullscreenExitBubbleContent( | 5529 window_->UpdateFullscreenExitBubbleContent( |
5529 url, GetFullscreenExitBubbleType()); | 5530 url, GetFullscreenExitBubbleType()); |
5530 } | 5531 } |
OLD | NEW |