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

Side by Side Diff: chrome/browser/views/tab_contents/tab_contents_container.cc

Issue 122002: Moving the WM_SETFOCUS message processing out of FocusManager (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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/views/tab_contents/tab_contents_container.h" 5 #include "chrome/browser/views/tab_contents/tab_contents_container.h"
6 6
7 #include "chrome/browser/tab_contents/interstitial_page.h"
7 #include "chrome/browser/tab_contents/tab_contents.h" 8 #include "chrome/browser/tab_contents/tab_contents.h"
8 #include "chrome/browser/view_ids.h" 9 #include "chrome/browser/view_ids.h"
9 #include "chrome/browser/views/tab_contents/native_tab_contents_container.h" 10 #include "chrome/browser/views/tab_contents/native_tab_contents_container.h"
10 #include "chrome/common/notification_service.h" 11 #include "chrome/common/notification_service.h"
11 12
12 //////////////////////////////////////////////////////////////////////////////// 13 ////////////////////////////////////////////////////////////////////////////////
13 // TabContentsContainer, public: 14 // TabContentsContainer, public:
14 15
15 TabContentsContainer::TabContentsContainer() 16 TabContentsContainer::TabContentsContainer()
16 : native_container_(NULL), 17 : native_container_(NULL),
(...skipping 14 matching lines...) Expand all
31 } 32 }
32 tab_contents_ = contents; 33 tab_contents_ = contents;
33 // When detaching the last tab of the browser ChangeTabContents is invoked 34 // When detaching the last tab of the browser ChangeTabContents is invoked
34 // with NULL. Don't attempt to do anything in that case. 35 // with NULL. Don't attempt to do anything in that case.
35 if (tab_contents_) { 36 if (tab_contents_) {
36 native_container_->AttachContents(tab_contents_); 37 native_container_->AttachContents(tab_contents_);
37 AddObservers(); 38 AddObservers();
38 } 39 }
39 } 40 }
40 41
42 void TabContentsContainer::TabContentsFocused(TabContents* tab_contents) {
43 native_container_->TabContentsFocused(tab_contents);
44 }
45
41 void TabContentsContainer::SetFastResize(bool fast_resize) { 46 void TabContentsContainer::SetFastResize(bool fast_resize) {
42 native_container_->SetFastResize(fast_resize); 47 native_container_->SetFastResize(fast_resize);
43 } 48 }
44 49
45 //////////////////////////////////////////////////////////////////////////////// 50 ////////////////////////////////////////////////////////////////////////////////
46 // TabContentsContainer, NotificationObserver implementation: 51 // TabContentsContainer, NotificationObserver implementation:
47 52
48 void TabContentsContainer::Observe(NotificationType type, 53 void TabContentsContainer::Observe(NotificationType type,
49 const NotificationSource& source, 54 const NotificationSource& source,
50 const NotificationDetails& details) { 55 const NotificationDetails& details) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 RenderViewHost* new_host) { 108 RenderViewHost* new_host) {
104 native_container_->RenderViewHostChanged(old_host, new_host); 109 native_container_->RenderViewHostChanged(old_host, new_host);
105 } 110 }
106 111
107 void TabContentsContainer::TabContentsDestroyed(TabContents* contents) { 112 void TabContentsContainer::TabContentsDestroyed(TabContents* contents) {
108 // Sometimes, a TabContents is destroyed before we know about it. This allows 113 // Sometimes, a TabContents is destroyed before we know about it. This allows
109 // us to clean up our state in case this happens. 114 // us to clean up our state in case this happens.
110 DCHECK(contents == tab_contents_); 115 DCHECK(contents == tab_contents_);
111 ChangeTabContents(NULL); 116 ChangeTabContents(NULL);
112 } 117 }
OLDNEW
« no previous file with comments | « chrome/browser/views/tab_contents/tab_contents_container.h ('k') | chrome/test/test_browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698