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

Side by Side Diff: chrome/browser/ui/tabs/tab_strip_model.cc

Issue 525793002: Make WebContentsObserver::web_contents() public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 6 years, 3 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
« no previous file with comments | « chrome/browser/ui/search/instant_page.cc ('k') | chrome/browser/ui/views/hung_renderer_view.h » ('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) 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 "chrome/browser/ui/tabs/tab_strip_model.h" 5 #include "chrome/browser/ui/tabs/tab_strip_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 WebContents* Next(); 61 WebContents* Next();
62 62
63 private: 63 private:
64 class DeletionObserver : public content::WebContentsObserver { 64 class DeletionObserver : public content::WebContentsObserver {
65 public: 65 public:
66 DeletionObserver(CloseTracker* parent, WebContents* web_contents) 66 DeletionObserver(CloseTracker* parent, WebContents* web_contents)
67 : WebContentsObserver(web_contents), 67 : WebContentsObserver(web_contents),
68 parent_(parent) { 68 parent_(parent) {
69 } 69 }
70 70
71 // Expose web_contents() publicly.
72 using content::WebContentsObserver::web_contents;
73
74 private: 71 private:
75 // WebContentsObserver: 72 // WebContentsObserver:
76 virtual void WebContentsDestroyed() OVERRIDE { 73 virtual void WebContentsDestroyed() OVERRIDE {
77 parent_->OnWebContentsDestroyed(this); 74 parent_->OnWebContentsDestroyed(this);
78 } 75 }
79 76
80 CloseTracker* parent_; 77 CloseTracker* parent_;
81 78
82 DISALLOW_COPY_AND_ASSIGN(DeletionObserver); 79 DISALLOW_COPY_AND_ASSIGN(DeletionObserver);
83 }; 80 };
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 void TabStripModel::ForgetOpenersAndGroupsReferencing( 1405 void TabStripModel::ForgetOpenersAndGroupsReferencing(
1409 const WebContents* tab) { 1406 const WebContents* tab) {
1410 for (WebContentsDataVector::const_iterator i = contents_data_.begin(); 1407 for (WebContentsDataVector::const_iterator i = contents_data_.begin();
1411 i != contents_data_.end(); ++i) { 1408 i != contents_data_.end(); ++i) {
1412 if ((*i)->group() == tab) 1409 if ((*i)->group() == tab)
1413 (*i)->set_group(NULL); 1410 (*i)->set_group(NULL);
1414 if ((*i)->opener() == tab) 1411 if ((*i)->opener() == tab)
1415 (*i)->set_opener(NULL); 1412 (*i)->set_opener(NULL);
1416 } 1413 }
1417 } 1414 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/instant_page.cc ('k') | chrome/browser/ui/views/hung_renderer_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698