| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
| (...skipping 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1964 /////////////////////////////////////////////////////////////////////////////// | 1964 /////////////////////////////////////////////////////////////////////////////// |
| 1965 // Browser, content::NotificationObserver implementation: | 1965 // Browser, content::NotificationObserver implementation: |
| 1966 | 1966 |
| 1967 void Browser::Observe(int type, | 1967 void Browser::Observe(int type, |
| 1968 const content::NotificationSource& source, | 1968 const content::NotificationSource& source, |
| 1969 const content::NotificationDetails& details) { | 1969 const content::NotificationDetails& details) { |
| 1970 switch (type) { | 1970 switch (type) { |
| 1971 case extensions::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: { | 1971 case extensions::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: { |
| 1972 Profile* profile = content::Source<Profile>(source).ptr(); | 1972 Profile* profile = content::Source<Profile>(source).ptr(); |
| 1973 if (profile_->IsSameProfile(profile) && window()->GetLocationBar()) | 1973 if (profile_->IsSameProfile(profile) && window()->GetLocationBar()) |
| 1974 window()->GetLocationBar()->InvalidatePageActions(); | 1974 window()->GetLocationBar()->UpdatePageActions(); |
| 1975 break; | 1975 break; |
| 1976 } | 1976 } |
| 1977 | 1977 |
| 1978 #if defined(ENABLE_THEMES) | 1978 #if defined(ENABLE_THEMES) |
| 1979 case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: | 1979 case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: |
| 1980 window()->UserChangedTheme(); | 1980 window()->UserChangedTheme(); |
| 1981 break; | 1981 break; |
| 1982 #endif | 1982 #endif |
| 1983 | 1983 |
| 1984 case chrome::NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED: { | 1984 case chrome::NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED: { |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2522 if (contents && !allow_js_access) { | 2522 if (contents && !allow_js_access) { |
| 2523 contents->web_contents()->GetController().LoadURL( | 2523 contents->web_contents()->GetController().LoadURL( |
| 2524 target_url, | 2524 target_url, |
| 2525 content::Referrer(), | 2525 content::Referrer(), |
| 2526 ui::PAGE_TRANSITION_LINK, | 2526 ui::PAGE_TRANSITION_LINK, |
| 2527 std::string()); // No extra headers. | 2527 std::string()); // No extra headers. |
| 2528 } | 2528 } |
| 2529 | 2529 |
| 2530 return contents != NULL; | 2530 return contents != NULL; |
| 2531 } | 2531 } |
| OLD | NEW |