| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/views/instant_confirm_view.h" | 5 #include "chrome/browser/ui/views/instant_confirm_view.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/instant/instant_confirm_dialog.h" | 8 #include "chrome/browser/instant/instant_confirm_dialog.h" |
| 9 #include "chrome/browser/instant/instant_controller.h" | 9 #include "chrome/browser/instant/instant_controller.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 return gfx::Size(pref_width, pref_height); | 74 return gfx::Size(pref_width, pref_height); |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool InstantConfirmView::IsModal() const { | 77 bool InstantConfirmView::IsModal() const { |
| 78 return true; | 78 return true; |
| 79 } | 79 } |
| 80 | 80 |
| 81 void InstantConfirmView::LinkClicked(views::Link* source, int event_flags) { | 81 void InstantConfirmView::LinkClicked(views::Link* source, int event_flags) { |
| 82 Browser* browser = BrowserList::GetLastActive(); | 82 Browser* browser = BrowserList::GetLastActive(); |
| 83 browser->OpenURL(browser::InstantLearnMoreURL(), GURL(), | 83 browser->OpenURL(browser::InstantLearnMoreURL(), GURL(), |
| 84 NEW_FOREGROUND_TAB, PageTransition::TYPED); | 84 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_TYPED); |
| 85 } | 85 } |
| 86 | 86 |
| 87 namespace browser { | 87 namespace browser { |
| 88 | 88 |
| 89 void ShowInstantConfirmDialog(gfx::NativeWindow parent, Profile* profile) { | 89 void ShowInstantConfirmDialog(gfx::NativeWindow parent, Profile* profile) { |
| 90 views::Widget::CreateWindowWithParent(new InstantConfirmView(profile), | 90 views::Widget::CreateWindowWithParent(new InstantConfirmView(profile), |
| 91 parent)->Show(); | 91 parent)->Show(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace browser | 94 } // namespace browser |
| OLD | NEW |