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

Side by Side Diff: chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc

Issue 7537030: Make panel adjust bounds per preferred size change notification on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/views/tab_contents/tab_contents_view_views.h" 5 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/ui/views/sad_tab_view.h" 10 #include "chrome/browser/ui/views/sad_tab_view.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // no longer be focusable (e.g. if the location bar was focused and then 220 // no longer be focusable (e.g. if the location bar was focused and then
221 // we switched to fullscreen mode). In that case we default to the 221 // we switched to fullscreen mode). In that case we default to the
222 // default focus. 222 // default focus.
223 SetInitialFocus(); 223 SetInitialFocus();
224 } 224 }
225 view_storage->RemoveView(last_focused_view_storage_id_); 225 view_storage->RemoveView(last_focused_view_storage_id_);
226 } 226 }
227 } 227 }
228 228
229 void TabContentsViewViews::UpdatePreferredSize(const gfx::Size& pref_size) { 229 void TabContentsViewViews::UpdatePreferredSize(const gfx::Size& pref_size) {
230 tab_contents_->UpdatePreferredSize(pref_size);
230 } 231 }
231 232
232 bool TabContentsViewViews::IsDoingDrag() const { 233 bool TabContentsViewViews::IsDoingDrag() const {
233 return native_tab_contents_view_->IsDoingDrag(); 234 return native_tab_contents_view_->IsDoingDrag();
234 } 235 }
235 236
236 void TabContentsViewViews::CancelDragAndCloseTab() { 237 void TabContentsViewViews::CancelDragAndCloseTab() {
237 DCHECK(IsDoingDrag()); 238 DCHECK(IsDoingDrag());
238 // We can't close the tab while we're in the drag and 239 // We can't close the tab while we're in the drag and
239 // |drag_handler_->CancelDrag()| is async. Instead, set a flag to cancel 240 // |drag_handler_->CancelDrag()| is async. Instead, set a flag to cancel
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 focus_manager_ = NULL; 415 focus_manager_ = NULL;
415 return focus_manager; 416 return focus_manager;
416 } 417 }
417 // TODO(jcampan): we should DCHECK on focus_manager_, as it should not be 418 // TODO(jcampan): we should DCHECK on focus_manager_, as it should not be
418 // NULL. We are not doing it as it breaks some unit-tests. We should 419 // NULL. We are not doing it as it breaks some unit-tests. We should
419 // probably have an empty TabContentView implementation for the unit-tests, 420 // probably have an empty TabContentView implementation for the unit-tests,
420 // that would prevent that code being executed in the unit-test case. 421 // that would prevent that code being executed in the unit-test case.
421 // DCHECK(focus_manager_); 422 // DCHECK(focus_manager_);
422 return focus_manager_; 423 return focus_manager_;
423 } 424 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698