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

Side by Side Diff: services/navigation/view_impl.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 | « pdf/pdfium/pdfium_engine.cc ('k') | ui/base/cocoa/cocoa_base_utils_unittest.mm » ('j') | 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 "services/navigation/view_impl.h" 5 #include "services/navigation/view_impl.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/public/browser/browser_context.h" 8 #include "content/public/browser/browser_context.h"
9 #include "content/public/browser/interstitial_page.h" 9 #include "content/public/browser/interstitial_page.h"
10 #include "content/public/browser/interstitial_page_delegate.h" 10 #include "content/public/browser/interstitial_page_delegate.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 void ViewImpl::AddNewContents(content::WebContents* source, 137 void ViewImpl::AddNewContents(content::WebContents* source,
138 content::WebContents* new_contents, 138 content::WebContents* new_contents,
139 WindowOpenDisposition disposition, 139 WindowOpenDisposition disposition,
140 const gfx::Rect& initial_rect, 140 const gfx::Rect& initial_rect,
141 bool user_gesture, 141 bool user_gesture,
142 bool* was_blocked) { 142 bool* was_blocked) {
143 mojom::ViewClientPtr client; 143 mojom::ViewClientPtr client;
144 mojom::ViewPtr view; 144 mojom::ViewPtr view;
145 mojom::ViewRequest view_request = GetProxy(&view); 145 mojom::ViewRequest view_request = GetProxy(&view);
146 client_->ViewCreated(std::move(view), GetProxy(&client), 146 client_->ViewCreated(std::move(view), GetProxy(&client),
147 disposition == NEW_POPUP, initial_rect, user_gesture); 147 disposition == WindowOpenDisposition::NEW_POPUP,
148 initial_rect, user_gesture);
148 149
149 const std::string new_user_id = 150 const std::string new_user_id =
150 content::BrowserContext::GetShellUserIdFor( 151 content::BrowserContext::GetShellUserIdFor(
151 new_contents->GetBrowserContext()); 152 new_contents->GetBrowserContext());
152 ViewImpl* impl = new ViewImpl( 153 ViewImpl* impl = new ViewImpl(
153 connector_->Clone(), new_user_id, std::move(client), 154 connector_->Clone(), new_user_id, std::move(client),
154 std::move(view_request), ref_->Clone()); 155 std::move(view_request), ref_->Clone());
155 // TODO(beng): This is a bit crappy. should be able to create the ViewImpl 156 // TODO(beng): This is a bit crappy. should be able to create the ViewImpl
156 // with |new_contents| instead. 157 // with |new_contents| instead.
157 impl->web_view_->SetWebContents(new_contents); 158 impl->web_view_->SetWebContents(new_contents);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 290
290 views::Widget* ViewImpl::GetWidget() { 291 views::Widget* ViewImpl::GetWidget() {
291 return web_view_->GetWidget(); 292 return web_view_->GetWidget();
292 } 293 }
293 294
294 const views::Widget* ViewImpl::GetWidget() const { 295 const views::Widget* ViewImpl::GetWidget() const {
295 return web_view_->GetWidget(); 296 return web_view_->GetWidget();
296 } 297 }
297 298
298 } // navigation 299 } // navigation
OLDNEW
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | ui/base/cocoa/cocoa_base_utils_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698