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

Side by Side Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel.cc

Issue 1963563002: Views: Flip default value of CustomButton::request_focus_on_press_ to false. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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/views/apps/app_info_dialog/app_info_permissions_pane l.h" 5 #include "chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_pane l.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "apps/app_load_service.h" 10 #include "apps/app_load_service.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 SetImage(views::CustomButton::STATE_HOVERED, 56 SetImage(views::CustomButton::STATE_HOVERED,
57 rb.GetImageNamed(IDR_DISABLE_H).ToImageSkia()); 57 rb.GetImageNamed(IDR_DISABLE_H).ToImageSkia());
58 SetImage(views::CustomButton::STATE_PRESSED, 58 SetImage(views::CustomButton::STATE_PRESSED,
59 rb.GetImageNamed(IDR_DISABLE_P).ToImageSkia()); 59 rb.GetImageNamed(IDR_DISABLE_P).ToImageSkia());
60 SetBorder(std::unique_ptr<views::Border>()); 60 SetBorder(std::unique_ptr<views::Border>());
61 SetSize(GetPreferredSize()); 61 SetSize(GetPreferredSize());
62 62
63 // Make the button focusable & give it alt-text so permissions can be 63 // Make the button focusable & give it alt-text so permissions can be
64 // revoked using only the keyboard. 64 // revoked using only the keyboard.
65 Button::ConfigureDefaultFocus(this); 65 Button::ConfigureDefaultFocus(this);
66 set_request_focus_on_press(true);
66 SetTooltipText(l10n_util::GetStringFUTF16( 67 SetTooltipText(l10n_util::GetStringFUTF16(
67 IDS_APPLICATION_INFO_REVOKE_PERMISSION_ALT_TEXT, permission_message)); 68 IDS_APPLICATION_INFO_REVOKE_PERMISSION_ALT_TEXT, permission_message));
68 } 69 }
69 ~RevokeButton() override {} 70 ~RevokeButton() override {}
70 71
71 private: 72 private:
72 // Overridden from views::ButtonListener. 73 // Overridden from views::ButtonListener.
73 void ButtonPressed(views::Button* sender, const ui::Event& event) override { 74 void ButtonPressed(views::Button* sender, const ui::Event& event) override {
74 DCHECK_EQ(this, sender); 75 DCHECK_EQ(this, sender);
75 if (!callback_.is_null()) 76 if (!callback_.is_null())
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 return extensions::DevicePermissionsManager::Get(profile_) 331 return extensions::DevicePermissionsManager::Get(profile_)
331 ->GetPermissionMessageStrings(app_->id()); 332 ->GetPermissionMessageStrings(app_->id());
332 } 333 }
333 334
334 void AppInfoPermissionsPanel::RevokeDevicePermissions() { 335 void AppInfoPermissionsPanel::RevokeDevicePermissions() {
335 extensions::DevicePermissionsManager::Get(profile_)->Clear(app_->id()); 336 extensions::DevicePermissionsManager::Get(profile_)->Clear(app_->id());
336 apps::AppLoadService::Get(profile_)->RestartApplicationIfRunning(app_->id()); 337 apps::AppLoadService::Get(profile_)->RestartApplicationIfRunning(app_->id());
337 338
338 Close(); 339 Close();
339 } 340 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/wimax_config_view.cc ('k') | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698