| 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/webui/web_dialog_web_contents_delegate.h" | 5 #include "ui/web_dialogs/web_dialog_web_contents_delegate.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/public/browser/web_contents.h" | 8 #include "content/public/browser/web_contents.h" |
| 9 | 9 |
| 10 using content::BrowserContext; | 10 using content::BrowserContext; |
| 11 using content::OpenURLParams; | 11 using content::OpenURLParams; |
| 12 using content::WebContents; | 12 using content::WebContents; |
| 13 | 13 |
| 14 namespace ui { |
| 15 |
| 14 // Incognito profiles are not long-lived, so we always want to store a | 16 // Incognito profiles are not long-lived, so we always want to store a |
| 15 // non-incognito profile. | 17 // non-incognito profile. |
| 16 // | 18 // |
| 17 // TODO(akalin): Should we make it so that we have a default incognito | 19 // TODO(akalin): Should we make it so that we have a default incognito |
| 18 // profile that's long-lived? Of course, we'd still have to clear it out | 20 // profile that's long-lived? Of course, we'd still have to clear it out |
| 19 // when all incognito browsers close. | 21 // when all incognito browsers close. |
| 20 WebDialogWebContentsDelegate::WebDialogWebContentsDelegate( | 22 WebDialogWebContentsDelegate::WebDialogWebContentsDelegate( |
| 21 content::BrowserContext* browser_context, | 23 content::BrowserContext* browser_context, |
| 22 WebContentsHandler* handler) | 24 WebContentsHandler* handler) |
| 23 : browser_context_(browser_context), | 25 : browser_context_(browser_context), |
| (...skipping 26 matching lines...) Expand all Loading... |
| 50 // This needs to return true so that we are allowed to be resized by our | 52 // This needs to return true so that we are allowed to be resized by our |
| 51 // contents. | 53 // contents. |
| 52 return true; | 54 return true; |
| 53 } | 55 } |
| 54 | 56 |
| 55 bool WebDialogWebContentsDelegate::ShouldAddNavigationToHistory( | 57 bool WebDialogWebContentsDelegate::ShouldAddNavigationToHistory( |
| 56 const history::HistoryAddPageArgs& add_page_args, | 58 const history::HistoryAddPageArgs& add_page_args, |
| 57 content::NavigationType navigation_type) { | 59 content::NavigationType navigation_type) { |
| 58 return false; | 60 return false; |
| 59 } | 61 } |
| 62 |
| 63 } // namespace ui |
| OLD | NEW |