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 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1750 } | 1750 } |
1751 } | 1751 } |
1752 | 1752 |
1753 void Browser::ShowKeyboardOverlay() { | 1753 void Browser::ShowKeyboardOverlay() { |
1754 window_->ShowKeyboardOverlay(window_->GetNativeHandle()); | 1754 window_->ShowKeyboardOverlay(window_->GetNativeHandle()); |
1755 } | 1755 } |
1756 #endif | 1756 #endif |
1757 | 1757 |
1758 void Browser::Exit() { | 1758 void Browser::Exit() { |
1759 UserMetrics::RecordAction(UserMetricsAction("Exit")); | 1759 UserMetrics::RecordAction(UserMetricsAction("Exit")); |
1760 BrowserList::AttemptUserExit(); | 1760 BrowserList::AttemptUserExit(false); |
1761 } | 1761 } |
1762 | 1762 |
1763 void Browser::BookmarkCurrentPage() { | 1763 void Browser::BookmarkCurrentPage() { |
1764 UserMetrics::RecordAction(UserMetricsAction("Star")); | 1764 UserMetrics::RecordAction(UserMetricsAction("Star")); |
1765 | 1765 |
1766 BookmarkModel* model = profile()->GetBookmarkModel(); | 1766 BookmarkModel* model = profile()->GetBookmarkModel(); |
1767 if (!model || !model->IsLoaded()) | 1767 if (!model || !model->IsLoaded()) |
1768 return; // Ignore requests until bookmarks are loaded. | 1768 return; // Ignore requests until bookmarks are loaded. |
1769 | 1769 |
1770 GURL url; | 1770 GURL url; |
(...skipping 3536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5307 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5307 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
5308 } else { | 5308 } else { |
5309 GlobalErrorService* service = | 5309 GlobalErrorService* service = |
5310 GlobalErrorServiceFactory::GetForProfile(profile()); | 5310 GlobalErrorServiceFactory::GetForProfile(profile()); |
5311 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5311 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
5312 if (error) { | 5312 if (error) { |
5313 error->ShowBubbleView(this); | 5313 error->ShowBubbleView(this); |
5314 } | 5314 } |
5315 } | 5315 } |
5316 } | 5316 } |
OLD | NEW |