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

Unified Diff: extensions/browser/api/app_window/app_window_api.cc

Issue 2137013005: [Extensions] Code Cleanup - Remove redundant smart-ptr get()s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/api/alarms/alarm_manager.cc ('k') | extensions/browser/api/bluetooth/bluetooth_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/app_window/app_window_api.cc
diff --git a/extensions/browser/api/app_window/app_window_api.cc b/extensions/browser/api/app_window/app_window_api.cc
index 05650e924e8f17ebe468697cd3f1086f71742b17..096f050bf6a839414c981de492d5f84b47dd566e 100644
--- a/extensions/browser/api/app_window/app_window_api.cc
+++ b/extensions/browser/api/app_window/app_window_api.cc
@@ -187,8 +187,8 @@ bool AppWindowCreateFunction::RunAsync() {
frame_id = existing_frame->GetRoutingID();
}
- if (!options->hidden.get() || !*options->hidden.get()) {
- if (options->focused.get() && !*options->focused.get())
+ if (!options->hidden.get() || !*options->hidden) {
+ if (options->focused.get() && !*options->focused)
existing_window->Show(AppWindow::SHOW_INACTIVE);
else
existing_window->Show(AppWindow::SHOW_ACTIVE);
@@ -297,13 +297,13 @@ bool AppWindowCreateFunction::RunAsync() {
}
if (options->hidden.get())
- create_params.hidden = *options->hidden.get();
+ create_params.hidden = *options->hidden;
if (options->resizable.get())
- create_params.resizable = *options->resizable.get();
+ create_params.resizable = *options->resizable;
if (options->always_on_top.get()) {
- create_params.always_on_top = *options->always_on_top.get();
+ create_params.always_on_top = *options->always_on_top;
if (create_params.always_on_top &&
!extension()->permissions_data()->HasAPIPermission(
@@ -314,11 +314,11 @@ bool AppWindowCreateFunction::RunAsync() {
}
if (options->focused.get())
- create_params.focused = *options->focused.get();
+ create_params.focused = *options->focused;
if (options->visible_on_all_workspaces.get()) {
create_params.visible_on_all_workspaces =
- *options->visible_on_all_workspaces.get();
+ *options->visible_on_all_workspaces;
}
if (options->type != app_window::WINDOW_TYPE_PANEL) {
@@ -455,33 +455,33 @@ bool AppWindowCreateFunction::GetBoundsSpec(
// This will be preserved as apps may be relying on this behavior.
if (options.default_width.get())
- params->content_spec.bounds.set_width(*options.default_width.get());
+ params->content_spec.bounds.set_width(*options.default_width);
if (options.default_height.get())
- params->content_spec.bounds.set_height(*options.default_height.get());
+ params->content_spec.bounds.set_height(*options.default_height);
if (options.default_left.get())
- params->window_spec.bounds.set_x(*options.default_left.get());
+ params->window_spec.bounds.set_x(*options.default_left);
if (options.default_top.get())
- params->window_spec.bounds.set_y(*options.default_top.get());
+ params->window_spec.bounds.set_y(*options.default_top);
if (options.width.get())
- params->content_spec.bounds.set_width(*options.width.get());
+ params->content_spec.bounds.set_width(*options.width);
if (options.height.get())
- params->content_spec.bounds.set_height(*options.height.get());
+ params->content_spec.bounds.set_height(*options.height);
if (options.left.get())
- params->window_spec.bounds.set_x(*options.left.get());
+ params->window_spec.bounds.set_x(*options.left);
if (options.top.get())
- params->window_spec.bounds.set_y(*options.top.get());
+ params->window_spec.bounds.set_y(*options.top);
if (options.bounds.get()) {
app_window::ContentBounds* bounds = options.bounds.get();
if (bounds->width.get())
- params->content_spec.bounds.set_width(*bounds->width.get());
+ params->content_spec.bounds.set_width(*bounds->width);
if (bounds->height.get())
- params->content_spec.bounds.set_height(*bounds->height.get());
+ params->content_spec.bounds.set_height(*bounds->height);
if (bounds->left.get())
- params->window_spec.bounds.set_x(*bounds->left.get());
+ params->window_spec.bounds.set_x(*bounds->left);
if (bounds->top.get())
- params->window_spec.bounds.set_y(*bounds->top.get());
+ params->window_spec.bounds.set_y(*bounds->top);
}
gfx::Size& minimum_size = params->content_spec.minimum_size;
« no previous file with comments | « extensions/browser/api/alarms/alarm_manager.cc ('k') | extensions/browser/api/bluetooth/bluetooth_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698