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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 1453803002: Separate RenderViewHost from RenderWidgetHost, part 10: shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nick's nits Created 5 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 void TearDownEnvironment() { 409 void TearDownEnvironment() {
410 sink_ = NULL; 410 sink_ = NULL;
411 process_host_ = NULL; 411 process_host_ = NULL;
412 if (view_) 412 if (view_)
413 view_->Destroy(); 413 view_->Destroy();
414 414
415 if (explicit_delete_view_) 415 if (explicit_delete_view_)
416 delete view_; 416 delete view_;
417 417
418 if (widget_host_uses_shutdown_to_destroy_) 418 if (widget_host_uses_shutdown_to_destroy_)
419 widget_host_->Shutdown(); 419 widget_host_->ShutdownAndDestroyWidget(true);
420 else 420 else
421 delete widget_host_; 421 delete widget_host_;
422 422
423 parent_view_->Destroy(); 423 parent_view_->Destroy();
424 delete parent_host_; 424 delete parent_host_;
425 425
426 browser_context_.reset(); 426 browser_context_.reset();
427 aura_test_helper_->TearDown(); 427 aura_test_helper_->TearDown();
428 428
429 message_loop_.DeleteSoon(FROM_HERE, browser_context_.release()); 429 message_loop_.DeleteSoon(FROM_HERE, browser_context_.release());
(...skipping 3187 matching lines...) Expand 10 before | Expand all | Expand 10 after
3617 ViewMsg_SetSurfaceIdNamespace::Read(msg, &params); 3617 ViewMsg_SetSurfaceIdNamespace::Read(msg, &params);
3618 view_->InitAsChild(NULL); 3618 view_->InitAsChild(NULL);
3619 view_->Show(); 3619 view_->Show();
3620 view_->SetSize(size); 3620 view_->SetSize(size);
3621 view_->OnSwapCompositorFrame(0, 3621 view_->OnSwapCompositorFrame(0,
3622 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); 3622 MakeDelegatedFrame(1.f, size, gfx::Rect(size)));
3623 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); 3623 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params));
3624 } 3624 }
3625 3625
3626 } // namespace content 3626 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698