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

Side by Side Diff: chrome/browser/extensions/extension_context_menu_model.cc

Issue 1227223004: Switch controlled settings indicators to inlined SVGs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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) 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/extensions/extension_context_menu_model.h" 5 #include "chrome/browser/extensions/extension_context_menu_model.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/extensions/active_script_controller.h" 10 #include "chrome/browser/extensions/active_script_controller.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 if (!is_component_) { 305 if (!is_component_) {
306 bool is_required_by_policy = 306 bool is_required_by_policy =
307 IsExtensionRequiredByPolicy(extension, profile_); 307 IsExtensionRequiredByPolicy(extension, profile_);
308 int message_id = is_required_by_policy ? 308 int message_id = is_required_by_policy ?
309 IDS_EXTENSIONS_INSTALLED_BY_ADMIN : IDS_EXTENSIONS_UNINSTALL; 309 IDS_EXTENSIONS_INSTALLED_BY_ADMIN : IDS_EXTENSIONS_UNINSTALL;
310 AddItem(UNINSTALL, l10n_util::GetStringUTF16(message_id)); 310 AddItem(UNINSTALL, l10n_util::GetStringUTF16(message_id));
311 if (is_required_by_policy) { 311 if (is_required_by_policy) {
312 int uninstall_index = GetIndexOfCommandId(UNINSTALL); 312 int uninstall_index = GetIndexOfCommandId(UNINSTALL);
313 SetIcon(uninstall_index, 313 SetIcon(uninstall_index,
314 ui::ResourceBundle::GetSharedInstance().GetImageNamed( 314 ui::ResourceBundle::GetSharedInstance().GetImageNamed(
315 IDR_CONTROLLED_SETTING_MANDATORY)); 315 IDR_OMNIBOX_HTTPS_POLICY_WARNING));
316 } 316 }
317 } 317 }
318 318
319 // Add a toggle visibility (show/hide) if the extension icon is shown on the 319 // Add a toggle visibility (show/hide) if the extension icon is shown on the
320 // toolbar. 320 // toolbar.
321 int visibility_string_id = 321 int visibility_string_id =
322 GetVisibilityStringId(profile_, extension, button_visibility); 322 GetVisibilityStringId(profile_, extension, button_visibility);
323 if (visibility_string_id != -1) 323 if (visibility_string_id != -1)
324 AddItemWithStringId(TOGGLE_VISIBILITY, visibility_string_id); 324 AddItemWithStringId(TOGGLE_VISIBILITY, visibility_string_id);
325 325
(...skipping 22 matching lines...) Expand all
348 extension_items_count_ = 0; 348 extension_items_count_ = 0;
349 extension_items_->AppendExtensionItems(MenuItem::ExtensionKey(extension_id_), 349 extension_items_->AppendExtensionItems(MenuItem::ExtensionKey(extension_id_),
350 base::string16(), 350 base::string16(),
351 &extension_items_count_, 351 &extension_items_count_,
352 true); // is_action_menu 352 true); // is_action_menu
353 } 353 }
354 354
355 content::WebContents* ExtensionContextMenuModel::GetActiveWebContents() const { 355 content::WebContents* ExtensionContextMenuModel::GetActiveWebContents() const {
356 return browser_->tab_strip_model()->GetActiveWebContents(); 356 return browser_->tab_strip_model()->GetActiveWebContents();
357 } 357 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/network_config_view.cc ('k') | ui/webui/resources/css/controlled_indicator.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698