Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: chrome/browser/chromeos/attestation/platform_verification_dialog.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/attestation/platform_verification_dialog.h" 5 #include "chrome/browser/chromeos/attestation/platform_verification_dialog.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser_finder.h" 9 #include "chrome/browser/ui/browser_finder.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
11 #include "chrome/browser/ui/browser_window.h" 11 #include "chrome/browser/ui/browser_window.h"
12 #include "chrome/browser/ui/singleton_tabs.h" 12 #include "chrome/browser/ui/singleton_tabs.h"
13 #include "chrome/common/url_constants.h" 13 #include "chrome/common/url_constants.h"
14 #include "chrome/grit/generated_resources.h" 14 #include "chrome/grit/generated_resources.h"
15 #include "components/web_modal/popup_manager.h" 15 #include "components/web_modal/popup_manager.h"
16 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
17 #include "content/public/common/page_transition_types.h"
18 #include "extensions/browser/extension_registry.h" 17 #include "extensions/browser/extension_registry.h"
19 #include "extensions/common/extension.h" 18 #include "extensions/common/extension.h"
20 #include "grit/components_strings.h" 19 #include "grit/components_strings.h"
21 #include "ui/aura/window.h" 20 #include "ui/aura/window.h"
22 #include "ui/base/l10n/l10n_util.h" 21 #include "ui/base/l10n/l10n_util.h"
22 #include "ui/base/page_transition_types.h"
23 #include "ui/views/border.h" 23 #include "ui/views/border.h"
24 #include "ui/views/controls/styled_label.h" 24 #include "ui/views/controls/styled_label.h"
25 #include "ui/views/layout/fill_layout.h" 25 #include "ui/views/layout/fill_layout.h"
26 #include "ui/views/layout/layout_constants.h" 26 #include "ui/views/layout/layout_constants.h"
27 #include "ui/views/widget/widget.h" 27 #include "ui/views/widget/widget.h"
28 #include "ui/views/window/dialog_delegate.h" 28 #include "ui/views/window/dialog_delegate.h"
29 29
30 namespace chromeos { 30 namespace chromeos {
31 namespace attestation { 31 namespace attestation {
32 32
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 int event_flags) { 130 int event_flags) {
131 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); 131 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_);
132 const GURL learn_more_url(chrome::kEnhancedPlaybackNotificationLearnMoreURL); 132 const GURL learn_more_url(chrome::kEnhancedPlaybackNotificationLearnMoreURL);
133 133
134 // |web_contents_| might not be in a browser in case of v2 apps. In that case, 134 // |web_contents_| might not be in a browser in case of v2 apps. In that case,
135 // open a new tab in the usual way. 135 // open a new tab in the usual way.
136 if (!browser) { 136 if (!browser) {
137 Profile* profile = Profile::FromBrowserContext( 137 Profile* profile = Profile::FromBrowserContext(
138 web_contents_->GetBrowserContext()); 138 web_contents_->GetBrowserContext());
139 chrome::NavigateParams params( 139 chrome::NavigateParams params(
140 profile, learn_more_url, content::PAGE_TRANSITION_LINK); 140 profile, learn_more_url, ui::PAGE_TRANSITION_LINK);
141 params.disposition = SINGLETON_TAB; 141 params.disposition = SINGLETON_TAB;
142 chrome::Navigate(&params); 142 chrome::Navigate(&params);
143 } else { 143 } else {
144 chrome::ShowSingletonTab(browser, learn_more_url); 144 chrome::ShowSingletonTab(browser, learn_more_url);
145 } 145 }
146 } 146 }
147 147
148 } // namespace attestation 148 } // namespace attestation
149 } // namespace chromeos 149 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698