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

Side by Side Diff: blimp/engine/browser/blimp_engine_session.cc

Issue 1440593004: Make operators on scoped_ptr match the ones defined for std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrequals: followupfix-after-rebase Created 5 years, 1 month 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 | « base/tracked_objects_unittest.cc ('k') | cc/input/scroll_state_unittest.cc » ('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 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 "blimp/engine/browser/blimp_engine_session.h" 5 #include "blimp/engine/browser/blimp_engine_session.h"
6 6
7 #include "blimp/common/proto/blimp_message.pb.h" 7 #include "blimp/common/proto/blimp_message.pb.h"
8 #include "blimp/common/proto/control.pb.h" 8 #include "blimp/common/proto/control.pb.h"
9 #include "blimp/engine/browser/blimp_browser_context.h" 9 #include "blimp/engine/browser/blimp_browser_context.h"
10 #include "blimp/engine/ui/blimp_layout_manager.h" 10 #include "blimp/engine/ui/blimp_layout_manager.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 return source; 218 return source;
219 } 219 }
220 220
221 void BlimpEngineSession::RequestToLockMouse(content::WebContents* web_contents, 221 void BlimpEngineSession::RequestToLockMouse(content::WebContents* web_contents,
222 bool user_gesture, 222 bool user_gesture,
223 bool last_unlocked_by_target) { 223 bool last_unlocked_by_target) {
224 web_contents->GotResponseToLockMouseRequest(true); 224 web_contents->GotResponseToLockMouseRequest(true);
225 } 225 }
226 226
227 void BlimpEngineSession::CloseContents(content::WebContents* source) { 227 void BlimpEngineSession::CloseContents(content::WebContents* source) {
228 if (source == web_contents_) 228 if (source == web_contents_.get())
229 web_contents_.reset(); 229 web_contents_.reset();
230 } 230 }
231 231
232 void BlimpEngineSession::ActivateContents(content::WebContents* contents) { 232 void BlimpEngineSession::ActivateContents(content::WebContents* contents) {
233 contents->GetRenderViewHost()->GetWidget()->Focus(); 233 contents->GetRenderViewHost()->GetWidget()->Focus();
234 } 234 }
235 235
236 void BlimpEngineSession::PlatformSetContents( 236 void BlimpEngineSession::PlatformSetContents(
237 scoped_ptr<content::WebContents> new_contents) { 237 scoped_ptr<content::WebContents> new_contents) {
238 new_contents->SetDelegate(this); 238 new_contents->SetDelegate(this);
239 web_contents_ = new_contents.Pass(); 239 web_contents_ = new_contents.Pass();
240 240
241 aura::Window* parent = window_tree_host_->window(); 241 aura::Window* parent = window_tree_host_->window();
242 aura::Window* content = web_contents_->GetNativeView(); 242 aura::Window* content = web_contents_->GetNativeView();
243 if (!parent->Contains(content)) 243 if (!parent->Contains(content))
244 parent->AddChild(content); 244 parent->AddChild(content);
245 content->Show(); 245 content->Show();
246 } 246 }
247 247
248 } // namespace engine 248 } // namespace engine
249 } // namespace blimp 249 } // namespace blimp
OLDNEW
« no previous file with comments | « base/tracked_objects_unittest.cc ('k') | cc/input/scroll_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698