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

Side by Side Diff: chrome/browser/ui/extensions/settings_api_bubble_helpers.cc

Issue 2206693002: Improve settings override bubble to indicate policy installed extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase master Created 4 years, 2 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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/extensions/settings_api_bubble_helpers.h" 5 #include "chrome/browser/ui/extensions/settings_api_bubble_helpers.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/extensions/ntp_overridden_bubble_delegate.h" 10 #include "chrome/browser/extensions/ntp_overridden_bubble_delegate.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 if (AutocompleteMatch::IsSearchType(match_type) && 65 if (AutocompleteMatch::IsSearchType(match_type) &&
66 match_type != AutocompleteMatchType::SEARCH_OTHER_ENGINE) { 66 match_type != AutocompleteMatchType::SEARCH_OTHER_ENGINE) {
67 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); 67 Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
68 if (browser) 68 if (browser)
69 ShowSettingsApiBubble(BUBBLE_TYPE_SEARCH_ENGINE, browser); 69 ShowSettingsApiBubble(BUBBLE_TYPE_SEARCH_ENGINE, browser);
70 } 70 }
71 } 71 }
72 72
73 void MaybeShowExtensionControlledNewTabPage( 73 void MaybeShowExtensionControlledNewTabPage(
74 Browser* browser, content::WebContents* web_contents) { 74 Browser* browser, content::WebContents* web_contents) {
75 #if !defined(OS_WIN) 75 /*#if !defined(OS_WIN)
Devlin 2016/10/20 00:23:42 Was this meant to be left in?
catmullings 2016/10/21 03:49:29 Done.
76 return; 76 return;
77 #endif 77 #endif*/
78 78
79 content::NavigationEntry* entry = 79 content::NavigationEntry* entry =
80 web_contents->GetController().GetActiveEntry(); 80 web_contents->GetController().GetActiveEntry();
81 if (!entry) 81 if (!entry)
82 return; 82 return;
83 GURL active_url = entry->GetURL(); 83 GURL active_url = entry->GetURL();
84 if (!active_url.SchemeIs(extensions::kExtensionScheme)) 84 if (!active_url.SchemeIs(extensions::kExtensionScheme))
85 return; // Not a URL that we care about. 85 return; // Not a URL that we care about.
86 86
87 // See if the current active URL matches a transformed NewTab URL. 87 // See if the current active URL matches a transformed NewTab URL.
(...skipping 18 matching lines...) Expand all
106 106
107 ntp_overridden_bubble->SetIsActiveBubble(); 107 ntp_overridden_bubble->SetIsActiveBubble();
108 ToolbarActionsBar* toolbar_actions_bar = 108 ToolbarActionsBar* toolbar_actions_bar =
109 browser->window()->GetToolbarActionsBar(); 109 browser->window()->GetToolbarActionsBar();
110 std::unique_ptr<ToolbarActionsBarBubbleDelegate> bridge( 110 std::unique_ptr<ToolbarActionsBarBubbleDelegate> bridge(
111 new ExtensionMessageBubbleBridge(std::move(ntp_overridden_bubble))); 111 new ExtensionMessageBubbleBridge(std::move(ntp_overridden_bubble)));
112 toolbar_actions_bar->ShowToolbarActionBubbleAsync(std::move(bridge)); 112 toolbar_actions_bar->ShowToolbarActionBubbleAsync(std::move(bridge));
113 } 113 }
114 114
115 } // namespace extensions 115 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698