OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/blocked_content/blocked_window_params.h" | 5 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
9 #include "content/public/browser/render_process_host.h" | 9 #include "content/public/browser/render_process_host.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 nav_params.window_bounds = web_contents->GetContainerBounds(); | 48 nav_params.window_bounds = web_contents->GetContainerBounds(); |
49 if (features_.xSet) | 49 if (features_.xSet) |
50 nav_params.window_bounds.set_x(features_.x); | 50 nav_params.window_bounds.set_x(features_.x); |
51 if (features_.ySet) | 51 if (features_.ySet) |
52 nav_params.window_bounds.set_y(features_.y); | 52 nav_params.window_bounds.set_y(features_.y); |
53 if (features_.widthSet) | 53 if (features_.widthSet) |
54 nav_params.window_bounds.set_width(features_.width); | 54 nav_params.window_bounds.set_width(features_.width); |
55 if (features_.heightSet) | 55 if (features_.heightSet) |
56 nav_params.window_bounds.set_height(features_.height); | 56 nav_params.window_bounds.set_height(features_.height); |
57 | 57 |
58 // Compare RenderViewImpl::show(). | 58 nav_params.disposition = disposition_; |
59 if (!user_gesture_ && disposition_ != NEW_BACKGROUND_TAB) | |
60 nav_params.disposition = NEW_POPUP; | |
61 else | |
62 nav_params.disposition = disposition_; | |
63 | 59 |
64 return nav_params; | 60 return nav_params; |
65 } | 61 } |
OLD | NEW |