| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/browser.h" | 5 #include "chrome/browser/browser.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 } | 936 } |
| 937 | 937 |
| 938 StatusBubble* Browser::GetStatusBubble() { | 938 StatusBubble* Browser::GetStatusBubble() { |
| 939 return window_->GetStatusBubble(); | 939 return window_->GetStatusBubble(); |
| 940 } | 940 } |
| 941 | 941 |
| 942 // Called whenever the window is moved so that we can update the position | 942 // Called whenever the window is moved so that we can update the position |
| 943 // of any WS_POPUP HWNDs. | 943 // of any WS_POPUP HWNDs. |
| 944 void Browser::WindowMoved() { | 944 void Browser::WindowMoved() { |
| 945 DCHECK(!g_browser_process->IsUsingNewFrames()); | 945 DCHECK(!g_browser_process->IsUsingNewFrames()); |
| 946 // Cancel any tabstrip animations, some of them may be invalidated by the |
| 947 // window being repositioned. |
| 948 window_->GetTabStrip()->DestroyDragController(); |
| 949 |
| 946 GetStatusBubble()->Reposition(); | 950 GetStatusBubble()->Reposition(); |
| 947 | 951 |
| 948 // Close the omnibox popup, if any. | 952 // Close the omnibox popup, if any. |
| 949 LocationBarView* location_bar = GetLocationBarView(); | 953 LocationBarView* location_bar = GetLocationBarView(); |
| 950 if (location_bar) | 954 if (location_bar) |
| 951 location_bar->location_entry()->ClosePopup(); | 955 location_bar->location_entry()->ClosePopup(); |
| 952 } | 956 } |
| 953 | 957 |
| 954 void Browser::ContentsMouseEvent(TabContents* source, UINT message) { | 958 void Browser::ContentsMouseEvent(TabContents* source, UINT message) { |
| 955 if (source == GetSelectedTabContents()) { | 959 if (source == GetSelectedTabContents()) { |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1864 void Browser::FormatTitleForDisplay(std::wstring* title) { | 1868 void Browser::FormatTitleForDisplay(std::wstring* title) { |
| 1865 size_t current_index = 0; | 1869 size_t current_index = 0; |
| 1866 size_t match_index; | 1870 size_t match_index; |
| 1867 while ((match_index = title->find(L'\n', current_index)) != | 1871 while ((match_index = title->find(L'\n', current_index)) != |
| 1868 std::wstring::npos) { | 1872 std::wstring::npos) { |
| 1869 title->replace(match_index, 1, L""); | 1873 title->replace(match_index, 1, L""); |
| 1870 current_index = match_index; | 1874 current_index = match_index; |
| 1871 } | 1875 } |
| 1872 } | 1876 } |
| 1873 | 1877 |
| OLD | NEW |