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

Side by Side Diff: content/shell/browser/shell_aura.cc

Issue 308463002: Show window even if the parent window already contains the window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/shell/browser/shell.h" 5 #include "content/shell/browser/shell.h"
6 6
7 #include "content/public/browser/web_contents.h" 7 #include "content/public/browser/web_contents.h"
8 #include "content/shell/browser/shell_platform_data_aura.h" 8 #include "content/shell/browser/shell_platform_data_aura.h"
9 #include "ui/aura/env.h" 9 #include "ui/aura/env.h"
10 #include "ui/aura/test/test_screen.h" 10 #include "ui/aura/test/test_screen.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 CHECK(platform_); 44 CHECK(platform_);
45 if (!headless_) 45 if (!headless_)
46 platform_->ShowWindow(); 46 platform_->ShowWindow();
47 platform_->ResizeWindow(gfx::Size(width, height)); 47 platform_->ResizeWindow(gfx::Size(width, height));
48 } 48 }
49 49
50 void Shell::PlatformSetContents() { 50 void Shell::PlatformSetContents() {
51 CHECK(platform_); 51 CHECK(platform_);
52 aura::Window* content = web_contents_->GetNativeView(); 52 aura::Window* content = web_contents_->GetNativeView();
53 aura::Window* parent = platform_->host()->window(); 53 aura::Window* parent = platform_->host()->window();
54 if (parent->Contains(content)) 54 if (!parent->Contains(content))
55 return; 55 parent->AddChild(content);
56 parent->AddChild(content); 56
57 content->Show(); 57 content->Show();
58 } 58 }
59 59
60 void Shell::PlatformResizeSubViews() { 60 void Shell::PlatformResizeSubViews() {
61 } 61 }
62 62
63 void Shell::Close() { 63 void Shell::Close() {
64 delete this; 64 delete this;
65 } 65 }
66 66
67 void Shell::PlatformSetTitle(const base::string16& title) { 67 void Shell::PlatformSetTitle(const base::string16& title) {
68 } 68 }
69 69
70 bool Shell::PlatformHandleContextMenu( 70 bool Shell::PlatformHandleContextMenu(
71 const content::ContextMenuParams& params) { 71 const content::ContextMenuParams& params) {
72 return false; 72 return false;
73 } 73 }
74 74
75 } // namespace content 75 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698