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

Side by Side Diff: chrome/browser/external_tab_container.cc

Issue 140023: Reverting 18872. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | « chrome/browser/browser_focus_uitest.cc ('k') | chrome/browser/first_run_win.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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/external_tab_container.h" 5 #include "chrome/browser/external_tab_container.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/win_util.h" 8 #include "app/win_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/win_util.h" 10 #include "base/win_util.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 bool ExternalTabContainer::Init(Profile* profile, 46 bool ExternalTabContainer::Init(Profile* profile,
47 HWND parent, 47 HWND parent,
48 const gfx::Rect& bounds, 48 const gfx::Rect& bounds,
49 DWORD style) { 49 DWORD style) {
50 if (IsWindow()) { 50 if (IsWindow()) {
51 NOTREACHED(); 51 NOTREACHED();
52 return false; 52 return false;
53 } 53 }
54 54
55 set_window_style(WS_POPUP); 55 set_window_style(WS_POPUP);
56 views::WidgetWin::Init(NULL, bounds); 56 views::WidgetWin::Init(NULL, bounds, true);
57 if (!IsWindow()) { 57 if (!IsWindow()) {
58 NOTREACHED(); 58 NOTREACHED();
59 return false; 59 return false;
60 } 60 }
61 // TODO(jcampan): limit focus traversal to contents.
62 61
63 // We don't ever remove the prop because the lifetime of this object 62 // We don't ever remove the prop because the lifetime of this object
64 // is the same as the lifetime of the window 63 // is the same as the lifetime of the window
65 SetProp(GetNativeView(), kWindowObjectKey, this); 64 SetProp(GetNativeView(), kWindowObjectKey, this);
66 65
67 tab_contents_ = new TabContents(profile, NULL, MSG_ROUTING_NONE, NULL); 66 tab_contents_ = new TabContents(profile, NULL, MSG_ROUTING_NONE, NULL);
68 tab_contents_->set_delegate(this); 67 tab_contents_->set_delegate(this);
69 tab_contents_->render_view_host()->AllowExternalHostBindings(); 68 tab_contents_->render_view_host()->AllowExternalHostBindings();
70 69
71 // Create a TabContentsContainer to handle focus cycling using Tab and 70 // Create a TabContentsContainer to handle focus cycling using Tab and
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 if (tab_contents_) { 412 if (tab_contents_) {
414 NotificationService::current()->Notify( 413 NotificationService::current()->Notify(
415 NotificationType::EXTERNAL_TAB_CLOSED, 414 NotificationType::EXTERNAL_TAB_CLOSED,
416 Source<NavigationController>(&tab_contents_->controller()), 415 Source<NavigationController>(&tab_contents_->controller()),
417 Details<ExternalTabContainer>(this)); 416 Details<ExternalTabContainer>(this));
418 417
419 delete tab_contents_; 418 delete tab_contents_;
420 tab_contents_ = NULL; 419 tab_contents_ = NULL;
421 } 420 }
422 } 421 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_focus_uitest.cc ('k') | chrome/browser/first_run_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698