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

Side by Side Diff: ui/views/mus/native_widget_mus.cc

Issue 2009333002: Converts Widget::SetOpacity from char to float (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ui/views/mus/native_widget_mus.h" 5 #include "ui/views/mus/native_widget_mus.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 break; 1053 break;
1054 } 1054 }
1055 } 1055 }
1056 } 1056 }
1057 1057
1058 bool NativeWidgetMus::IsFullscreen() const { 1058 bool NativeWidgetMus::IsFullscreen() const {
1059 return mus_window_observer_ && 1059 return mus_window_observer_ &&
1060 mus_window_observer_->show_state() == mus::mojom::ShowState::FULLSCREEN; 1060 mus_window_observer_->show_state() == mus::mojom::ShowState::FULLSCREEN;
1061 } 1061 }
1062 1062
1063 void NativeWidgetMus::SetOpacity(unsigned char opacity) { 1063 void NativeWidgetMus::SetOpacity(float opacity) {
1064 if (window_) 1064 if (window_)
1065 window_->SetOpacity(opacity / 255.0); 1065 window_->SetOpacity(opacity);
1066 } 1066 }
1067 1067
1068 void NativeWidgetMus::FlashFrame(bool flash_frame) { 1068 void NativeWidgetMus::FlashFrame(bool flash_frame) {
1069 // NOTIMPLEMENTED(); 1069 // NOTIMPLEMENTED();
1070 } 1070 }
1071 1071
1072 void NativeWidgetMus::RunShellDrag( 1072 void NativeWidgetMus::RunShellDrag(
1073 View* view, 1073 View* view,
1074 const ui::OSExchangeData& data, 1074 const ui::OSExchangeData& data,
1075 const gfx::Point& location, 1075 const gfx::Point& location,
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 1359
1360 gfx::Path mask_path; 1360 gfx::Path mask_path;
1361 native_widget_delegate_->GetHitTestMask(&mask_path); 1361 native_widget_delegate_->GetHitTestMask(&mask_path);
1362 // TODO(jamescook): Use the full path for the mask. 1362 // TODO(jamescook): Use the full path for the mask.
1363 gfx::Rect mask_rect = 1363 gfx::Rect mask_rect =
1364 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); 1364 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds()));
1365 window_->SetHitTestMask(mask_rect); 1365 window_->SetHitTestMask(mask_rect);
1366 } 1366 }
1367 1367
1368 } // namespace views 1368 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/native_widget_mus.h ('k') | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698