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

Side by Side Diff: chrome/browser/views/tabs/dragged_tab_view.cc

Issue 60066: Make the throbber throb sooner after you navigate. This fixes the new tab pag... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 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) 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/views/tabs/dragged_tab_view.h" 5 #include "chrome/browser/views/tabs/dragged_tab_view.h"
6 6
7 #include "chrome/common/gfx/chrome_canvas.h" 7 #include "chrome/common/gfx/chrome_canvas.h"
8 #include "chrome/browser/tab_contents/tab_contents.h" 8 #include "chrome/browser/tab_contents/tab_contents.h"
9 #include "chrome/browser/tabs/tab_strip_model.h" 9 #include "chrome/browser/tabs/tab_strip_model.h"
10 #include "chrome/browser/views/tabs/hwnd_photobooth.h" 10 #include "chrome/browser/views/tabs/hwnd_photobooth.h"
(...skipping 18 matching lines...) Expand all
29 : container_(NULL), 29 : container_(NULL),
30 renderer_(new TabRenderer), 30 renderer_(new TabRenderer),
31 attached_(false), 31 attached_(false),
32 mouse_tab_offset_(mouse_tab_offset), 32 mouse_tab_offset_(mouse_tab_offset),
33 attached_tab_size_(TabRenderer::GetMinimumSelectedSize()), 33 attached_tab_size_(TabRenderer::GetMinimumSelectedSize()),
34 photobooth_(NULL), 34 photobooth_(NULL),
35 contents_size_(contents_size), 35 contents_size_(contents_size),
36 close_animation_(this) { 36 close_animation_(this) {
37 SetParentOwned(false); 37 SetParentOwned(false);
38 38
39 renderer_->UpdateData(datasource); 39 renderer_->UpdateData(datasource, false);
40 40
41 container_.reset(new views::WidgetWin); 41 container_.reset(new views::WidgetWin);
42 container_->set_delete_on_destroy(false); 42 container_->set_delete_on_destroy(false);
43 container_->set_window_style(WS_POPUP); 43 container_->set_window_style(WS_POPUP);
44 container_->set_window_ex_style( 44 container_->set_window_ex_style(
45 WS_EX_LAYERED | WS_EX_TOPMOST | WS_EX_TOOLWINDOW); 45 WS_EX_LAYERED | WS_EX_TOPMOST | WS_EX_TOOLWINDOW);
46 container_->set_can_update_layered_window(false); 46 container_->set_can_update_layered_window(false);
47 container_->Init(NULL, gfx::Rect(0, 0, 0, 0), false); 47 container_->Init(NULL, gfx::Rect(0, 0, 0, 0), false);
48 container_->SetContentsView(this); 48 container_->SetContentsView(this);
49 } 49 }
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 void DraggedTabView::ResizeContainer() { 230 void DraggedTabView::ResizeContainer() {
231 gfx::Size ps = GetPreferredSize(); 231 gfx::Size ps = GetPreferredSize();
232 SetWindowPos(container_->GetNativeView(), HWND_TOPMOST, 0, 0, 232 SetWindowPos(container_->GetNativeView(), HWND_TOPMOST, 0, 0,
233 ScaleValue(ps.width()), ScaleValue(ps.height()), 233 ScaleValue(ps.width()), ScaleValue(ps.height()),
234 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); 234 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
235 } 235 }
236 236
237 int DraggedTabView::ScaleValue(int value) { 237 int DraggedTabView::ScaleValue(int value) {
238 return attached_ ? value : static_cast<int>(value * kScalingFactor); 238 return attached_ ? value : static_cast<int>(value * kScalingFactor);
239 } 239 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698