OLD | NEW |
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 "content/browser/web_contents/web_contents_view_win.h" | 5 #include "content/browser/web_contents/web_contents_view_win.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "content/browser/renderer_host/render_view_host_factory.h" | 9 #include "content/browser/renderer_host/render_view_host_factory.h" |
10 #include "content/browser/renderer_host/render_view_host_impl.h" | 10 #include "content/browser/renderer_host/render_view_host_impl.h" |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 | 383 |
384 WINDOWPOS* window_pos = reinterpret_cast<WINDOWPOS*>(lparam); | 384 WINDOWPOS* window_pos = reinterpret_cast<WINDOWPOS*>(lparam); |
385 if (window_pos->flags & SWP_HIDEWINDOW) { | 385 if (window_pos->flags & SWP_HIDEWINDOW) { |
386 web_contents_->WasHidden(); | 386 web_contents_->WasHidden(); |
387 return 0; | 387 return 0; |
388 } | 388 } |
389 | 389 |
390 // The WebContents was shown by a means other than the user selecting a | 390 // The WebContents was shown by a means other than the user selecting a |
391 // Tab, e.g. the window was minimized then restored. | 391 // Tab, e.g. the window was minimized then restored. |
392 if (window_pos->flags & SWP_SHOWWINDOW) | 392 if (window_pos->flags & SWP_SHOWWINDOW) |
393 web_contents_->WasRestored(); | 393 web_contents_->WasShown(); |
394 | 394 |
395 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); | 395 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); |
396 if (rwhv) { | 396 if (rwhv) { |
397 RenderWidgetHostViewWin* view = static_cast<RenderWidgetHostViewWin*>(rwhv); | 397 RenderWidgetHostViewWin* view = static_cast<RenderWidgetHostViewWin*>(rwhv); |
398 view->UpdateScreenInfo(); | 398 view->UpdateScreenInfo(); |
399 } | 399 } |
400 | 400 |
401 // Unless we were specifically told not to size, cause the renderer to be | 401 // Unless we were specifically told not to size, cause the renderer to be |
402 // sized to the new bounds, which forces a repaint. Not required for the | 402 // sized to the new bounds, which forces a repaint. Not required for the |
403 // simple minimize-restore case described above, for example, since the | 403 // simple minimize-restore case described above, for example, since the |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 si.nMin = 1; | 523 si.nMin = 1; |
524 si.nMax = 100; | 524 si.nMax = 100; |
525 si.nPage = 10; | 525 si.nPage = 10; |
526 si.nPos = 50; | 526 si.nPos = 50; |
527 | 527 |
528 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); | 528 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); |
529 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); | 529 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); |
530 | 530 |
531 return 1; | 531 return 1; |
532 } | 532 } |
OLD | NEW |