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

Side by Side Diff: chrome/browser/chromeos/arc/page_transition_util.cc

Issue 2348673002: Add an external protocol dialog for ARC (Closed)
Patch Set: Address Xiyuan's comment Created 4 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/arc/page_transition_util.h"
6
7 namespace arc {
8
9 bool ShouldIgnoreNavigation(ui::PageTransition page_transition) {
10 // Mask out any redirect qualifiers - this method handles navigation from
11 // redirect and non-redirect navigations equivalently.
12 page_transition = ui::PageTransitionFromInt(
13 page_transition & ~ui::PAGE_TRANSITION_IS_REDIRECT_MASK);
14
15 if (!ui::PageTransitionCoreTypeIs(page_transition,
16 ui::PAGE_TRANSITION_LINK)) {
17 // Do not handle the |url| if this event wasn't spawned by the user clicking
18 // on a link.
19 return true;
20 }
21
22 if (ui::PageTransitionGetQualifier(page_transition) != 0) {
23 // Qualifiers indicate that this navigation was the result of a click on a
24 // forward/back button, or typing in the URL bar, etc. Don't handle any of
25 // those types of navigations.
26 return true;
27 }
28
29 return false;
30 }
31
32 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/page_transition_util.h ('k') | chrome/browser/chromeos/external_protocol_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698