Chromium Code Reviews| 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 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1472 bool Browser::TakeFocus(content::WebContents* source, | 1472 bool Browser::TakeFocus(content::WebContents* source, |
| 1473 bool reverse) { | 1473 bool reverse) { |
| 1474 content::NotificationService::current()->Notify( | 1474 content::NotificationService::current()->Notify( |
| 1475 chrome::NOTIFICATION_FOCUS_RETURNED_TO_BROWSER, | 1475 chrome::NOTIFICATION_FOCUS_RETURNED_TO_BROWSER, |
| 1476 content::Source<Browser>(this), | 1476 content::Source<Browser>(this), |
| 1477 content::NotificationService::NoDetails()); | 1477 content::NotificationService::NoDetails()); |
| 1478 return false; | 1478 return false; |
| 1479 } | 1479 } |
| 1480 | 1480 |
| 1481 gfx::Rect Browser::GetRootWindowResizerRect() const { | 1481 gfx::Rect Browser::GetRootWindowResizerRect() const { |
| 1482 if (!window_) return gfx::Rect(); | |
|
piman
2014/10/29 18:42:57
In which case is this NULL? It seems to be set to
mkosiba (inactive)
2014/10/31 14:35:05
Done.
| |
| 1482 return window_->GetRootWindowResizerRect(); | 1483 return window_->GetRootWindowResizerRect(); |
| 1483 } | 1484 } |
| 1484 | 1485 |
| 1485 void Browser::BeforeUnloadFired(WebContents* web_contents, | 1486 void Browser::BeforeUnloadFired(WebContents* web_contents, |
| 1486 bool proceed, | 1487 bool proceed, |
| 1487 bool* proceed_to_fire_unload) { | 1488 bool* proceed_to_fire_unload) { |
| 1488 if (is_devtools() && DevToolsWindow::HandleBeforeUnload(web_contents, | 1489 if (is_devtools() && DevToolsWindow::HandleBeforeUnload(web_contents, |
| 1489 proceed, proceed_to_fire_unload)) | 1490 proceed, proceed_to_fire_unload)) |
| 1490 return; | 1491 return; |
| 1491 | 1492 |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2497 if (contents && !allow_js_access) { | 2498 if (contents && !allow_js_access) { |
| 2498 contents->web_contents()->GetController().LoadURL( | 2499 contents->web_contents()->GetController().LoadURL( |
| 2499 target_url, | 2500 target_url, |
| 2500 content::Referrer(), | 2501 content::Referrer(), |
| 2501 ui::PAGE_TRANSITION_LINK, | 2502 ui::PAGE_TRANSITION_LINK, |
| 2502 std::string()); // No extra headers. | 2503 std::string()); // No extra headers. |
| 2503 } | 2504 } |
| 2504 | 2505 |
| 2505 return contents != NULL; | 2506 return contents != NULL; |
| 2506 } | 2507 } |
| OLD | NEW |