| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 3719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3730 TabContentsWrapper::GetCurrentWrapperForContents(contents); | 3730 TabContentsWrapper::GetCurrentWrapperForContents(contents); |
| 3731 if (!wrapper) | 3731 if (!wrapper) |
| 3732 wrapper = new TabContentsWrapper(contents); | 3732 wrapper = new TabContentsWrapper(contents); |
| 3733 app_browser->tabstrip_model()->AppendTabContents(wrapper, true); | 3733 app_browser->tabstrip_model()->AppendTabContents(wrapper, true); |
| 3734 | 3734 |
| 3735 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 3735 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
| 3736 contents->GetRenderViewHost()->SyncRendererPrefs(); | 3736 contents->GetRenderViewHost()->SyncRendererPrefs(); |
| 3737 app_browser->window()->Show(); | 3737 app_browser->window()->Show(); |
| 3738 } | 3738 } |
| 3739 | 3739 |
| 3740 gfx::Rect Browser::GetRootWindowResizerRect() const { |
| 3741 return window_->GetRootWindowResizerRect(); |
| 3742 } |
| 3743 |
| 3740 void Browser::BeforeUnloadFired(WebContents* tab, | 3744 void Browser::BeforeUnloadFired(WebContents* tab, |
| 3741 bool proceed, | 3745 bool proceed, |
| 3742 bool* proceed_to_fire_unload) { | 3746 bool* proceed_to_fire_unload) { |
| 3743 if (!is_attempting_to_close_browser_) { | 3747 if (!is_attempting_to_close_browser_) { |
| 3744 *proceed_to_fire_unload = proceed; | 3748 *proceed_to_fire_unload = proceed; |
| 3745 if (!proceed) | 3749 if (!proceed) |
| 3746 tab->SetClosedByUserGesture(false); | 3750 tab->SetClosedByUserGesture(false); |
| 3747 return; | 3751 return; |
| 3748 } | 3752 } |
| 3749 | 3753 |
| (...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5482 local_state->SetBoolean(prefs::kShouldShowFirstRunBubble, false); | 5486 local_state->SetBoolean(prefs::kShouldShowFirstRunBubble, false); |
| 5483 window_->GetLocationBar()->ShowFirstRunBubble(); | 5487 window_->GetLocationBar()->ShowFirstRunBubble(); |
| 5484 } else { | 5488 } else { |
| 5485 GlobalErrorService* service = | 5489 GlobalErrorService* service = |
| 5486 GlobalErrorServiceFactory::GetForProfile(profile()); | 5490 GlobalErrorServiceFactory::GetForProfile(profile()); |
| 5487 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5491 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
| 5488 if (error) | 5492 if (error) |
| 5489 error->ShowBubbleView(this); | 5493 error->ShowBubbleView(this); |
| 5490 } | 5494 } |
| 5491 } | 5495 } |
| OLD | NEW |