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

Side by Side Diff: chrome/browser/ui/ash/palette_delegate_chromeos.cc

Issue 2642723007: chromeos: Removed enable magnifier from palette delegate. (Closed)
Patch Set: Trybot. Created 3 years, 11 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
« no previous file with comments | « chrome/browser/ui/ash/palette_delegate_chromeos.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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/ash/palette_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/palette_delegate_chromeos.h"
6 6
7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
8 #include "ash/common/system/chromeos/palette/palette_utils.h" 8 #include "ash/common/system/chromeos/palette/palette_utils.h"
9 #include "ash/magnifier/partial_magnification_controller.h"
10 #include "ash/screenshot_delegate.h" 9 #include "ash/screenshot_delegate.h"
11 #include "ash/shell.h" 10 #include "ash/shell.h"
12 #include "ash/utility/screenshot_controller.h" 11 #include "ash/utility/screenshot_controller.h"
13 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
14 #include "chrome/browser/chrome_notification_types.h" 13 #include "chrome/browser/chrome_notification_types.h"
15 #include "chrome/browser/chromeos/note_taking_helper.h" 14 #include "chrome/browser/chromeos/note_taking_helper.h"
16 #include "chrome/browser/chromeos/profiles/profile_helper.h" 15 #include "chrome/browser/chromeos/profiles/profile_helper.h"
17 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/profiles/profile_manager.h" 17 #include "chrome/browser/profiles/profile_manager.h"
19 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Run listener with new pref value, if any. 124 // Run listener with new pref value, if any.
126 OnPaletteEnabledPrefChanged(); 125 OnPaletteEnabledPrefChanged();
127 } 126 }
128 127
129 void PaletteDelegateChromeOS::OnPartialScreenshotDone( 128 void PaletteDelegateChromeOS::OnPartialScreenshotDone(
130 const base::Closure& then) { 129 const base::Closure& then) {
131 if (then) 130 if (then)
132 then.Run(); 131 then.Run();
133 } 132 }
134 133
135 void PaletteDelegateChromeOS::SetPartialMagnifierState(bool enabled) {
136 ash::PartialMagnificationController* controller =
137 ash::Shell::GetInstance()->partial_magnification_controller();
138 controller->SetEnabled(enabled);
139 }
140
141 void PaletteDelegateChromeOS::SetStylusStateChangedCallback( 134 void PaletteDelegateChromeOS::SetStylusStateChangedCallback(
142 const OnStylusStateChangedCallback& on_stylus_state_changed) { 135 const OnStylusStateChangedCallback& on_stylus_state_changed) {
143 on_stylus_state_changed_ = on_stylus_state_changed; 136 on_stylus_state_changed_ = on_stylus_state_changed;
144 } 137 }
145 138
146 bool PaletteDelegateChromeOS::ShouldAutoOpenPalette() { 139 bool PaletteDelegateChromeOS::ShouldAutoOpenPalette() {
147 if (!profile_) 140 if (!profile_)
148 return false; 141 return false;
149 142
150 return profile_->GetPrefs()->GetBoolean(prefs::kLaunchPaletteOnEjectEvent); 143 return profile_->GetPrefs()->GetBoolean(prefs::kLaunchPaletteOnEjectEvent);
(...skipping 29 matching lines...) Expand all
180 } 173 }
181 174
182 void PaletteDelegateChromeOS::CancelPartialScreenshot() { 175 void PaletteDelegateChromeOS::CancelPartialScreenshot() {
183 ash::Shell::GetInstance()->screenshot_controller()->CancelScreenshotSession(); 176 ash::Shell::GetInstance()->screenshot_controller()->CancelScreenshotSession();
184 } 177 }
185 178
186 void PaletteDelegateChromeOS::OnStylusStateChanged(ui::StylusState state) { 179 void PaletteDelegateChromeOS::OnStylusStateChanged(ui::StylusState state) {
187 on_stylus_state_changed_.Run(state); 180 on_stylus_state_changed_.Run(state);
188 } 181 }
189 } // namespace chromeos 182 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/palette_delegate_chromeos.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698