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

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: 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
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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 return source; 168 return source;
169 } 169 }
170 170
171 void BlimpEngineSession::RequestToLockMouse(content::WebContents* web_contents, 171 void BlimpEngineSession::RequestToLockMouse(content::WebContents* web_contents,
172 bool user_gesture, 172 bool user_gesture,
173 bool last_unlocked_by_target) { 173 bool last_unlocked_by_target) {
174 web_contents->GotResponseToLockMouseRequest(true); 174 web_contents->GotResponseToLockMouseRequest(true);
175 } 175 }
176 176
177 void BlimpEngineSession::CloseContents(content::WebContents* source) { 177 void BlimpEngineSession::CloseContents(content::WebContents* source) {
178 if (source == web_contents_) 178 if (source == web_contents_.get())
179 web_contents_.reset(); 179 web_contents_.reset();
180 } 180 }
181 181
182 void BlimpEngineSession::ActivateContents(content::WebContents* contents) { 182 void BlimpEngineSession::ActivateContents(content::WebContents* contents) {
183 contents->GetRenderViewHost()->GetWidget()->Focus(); 183 contents->GetRenderViewHost()->GetWidget()->Focus();
184 } 184 }
185 185
186 void BlimpEngineSession::PlatformSetContents( 186 void BlimpEngineSession::PlatformSetContents(
187 scoped_ptr<content::WebContents> new_contents) { 187 scoped_ptr<content::WebContents> new_contents) {
188 new_contents->SetDelegate(this); 188 new_contents->SetDelegate(this);
189 web_contents_ = new_contents.Pass(); 189 web_contents_ = new_contents.Pass();
190 190
191 aura::Window* parent = window_tree_host_->window(); 191 aura::Window* parent = window_tree_host_->window();
192 aura::Window* content = web_contents_->GetNativeView(); 192 aura::Window* content = web_contents_->GetNativeView();
193 if (!parent->Contains(content)) 193 if (!parent->Contains(content))
194 parent->AddChild(content); 194 parent->AddChild(content);
195 content->Show(); 195 content->Show();
196 } 196 }
197 197
198 } // namespace engine 198 } // namespace engine
199 } // namespace blimp 199 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698