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

Side by Side Diff: chrome/browser/ui/views/panels/panel_view.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some new gfx::Screen additions Created 8 years, 2 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) 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/views/panels/panel_view.h" 5 #include "chrome/browser/ui/views/panels/panel_view.h"
6 6
7 #include <map> 7 #include <map>
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 649
650 // Expand the panel if the minimized panel is activated by means other than 650 // Expand the panel if the minimized panel is activated by means other than
651 // clicking on its titlebar. This is the workaround to support restoring the 651 // clicking on its titlebar. This is the workaround to support restoring the
652 // minimized panel by other means, like alt-tabbing, win-tabbing, or clicking 652 // minimized panel by other means, like alt-tabbing, win-tabbing, or clicking
653 // the taskbar icon. Note that this workaround does not work for one edge 653 // the taskbar icon. Note that this workaround does not work for one edge
654 // case: the mouse happens to be at the minimized panel when the user tries to 654 // case: the mouse happens to be at the minimized panel when the user tries to
655 // bring up the panel with the above alternatives. 655 // bring up the panel with the above alternatives.
656 // When the user clicks on the minimized panel, the panel expansion will be 656 // When the user clicks on the minimized panel, the panel expansion will be
657 // done when we process the mouse button pressed message. 657 // done when we process the mouse button pressed message.
658 if (focused_ && panel_->IsMinimized() && 658 if (focused_ && panel_->IsMinimized() &&
659 gfx::Screen::GetWindowAtCursorScreenPoint() != 659 gfx::Screen::GetScreenFor(widget->GetNativeWindow())->
660 widget->GetNativeWindow()) { 660 GetWindowAtCursorScreenPoint() != widget->GetNativeWindow()) {
661 panel_->Restore(); 661 panel_->Restore();
662 } 662 }
663 663
664 panel()->OnActiveStateChanged(focused); 664 panel()->OnActiveStateChanged(focused);
665 } 665 }
666 666
667 bool PanelView::OnTitlebarMousePressed(const gfx::Point& mouse_location) { 667 bool PanelView::OnTitlebarMousePressed(const gfx::Point& mouse_location) {
668 mouse_pressed_ = true; 668 mouse_pressed_ = true;
669 mouse_dragging_state_ = NO_DRAGGING; 669 mouse_dragging_state_ = NO_DRAGGING;
670 last_mouse_location_ = mouse_location; 670 last_mouse_location_ = mouse_location;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 int height = web_view_->size().height(); 788 int height = web_view_->size().height();
789 SkRegion* region = new SkRegion; 789 SkRegion* region = new SkRegion;
790 region->op(0, 0, kResizeInsideBoundsSize, height, SkRegion::kUnion_Op); 790 region->op(0, 0, kResizeInsideBoundsSize, height, SkRegion::kUnion_Op);
791 region->op(width - kResizeInsideBoundsSize, 0, width, height, 791 region->op(width - kResizeInsideBoundsSize, 0, width, height,
792 SkRegion::kUnion_Op); 792 SkRegion::kUnion_Op);
793 region->op(0, height - kResizeInsideBoundsSize, width, height, 793 region->op(0, height - kResizeInsideBoundsSize, width, height,
794 SkRegion::kUnion_Op); 794 SkRegion::kUnion_Op);
795 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); 795 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region);
796 #endif 796 #endif
797 } 797 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698