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

Side by Side Diff: chrome/browser/dock_info.cc

Issue 18540: Don't expose the go and star button views directly through the BrowserWindow ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
« no previous file with comments | « chrome/browser/browser_window_cocoa.mm ('k') | chrome/browser/views/frame/browser_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) 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/dock_info.h" 5 #include "chrome/browser/dock_info.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
10 #include "chrome/browser/browser_list.h" 10 #include "chrome/browser/browser_list.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 !TopMostFinder::IsTopMostWindowAtPoint(finder.result_.hwnd(), 257 !TopMostFinder::IsTopMostWindowAtPoint(finder.result_.hwnd(),
258 finder.result_.hot_spot(), 258 finder.result_.hot_spot(),
259 ignore)) { 259 ignore)) {
260 return DockInfo(); 260 return DockInfo();
261 } 261 }
262 return finder.result_; 262 return finder.result_;
263 } 263 }
264 264
265 protected: 265 protected:
266 virtual bool ShouldStopIterating(HWND hwnd) { 266 virtual bool ShouldStopIterating(HWND hwnd) {
267 BrowserWindow* window = BrowserView::GetBrowserWindowForHWND(hwnd); 267 BrowserView* window = BrowserView::GetBrowserViewForHWND(hwnd);
268 CRect bounds; 268 CRect bounds;
269 if (!window || !::IsWindowVisible(hwnd) || 269 if (!window || !::IsWindowVisible(hwnd) ||
270 !::GetWindowRect(hwnd, &bounds)) { 270 !::GetWindowRect(hwnd, &bounds)) {
271 return false; 271 return false;
272 } 272 }
273 273
274 // Check the three corners we allow docking to. We don't currently allow 274 // Check the three corners we allow docking to. We don't currently allow
275 // docking to top of window as it conflicts with docking to the tab strip. 275 // docking to top of window as it conflicts with docking to the tab strip.
276 if (CheckPoint(hwnd, bounds.left, (bounds.top + bounds.bottom) / 2, 276 if (CheckPoint(hwnd, bounds.left, (bounds.top + bounds.bottom) / 2,
277 DockInfo::LEFT_OF_WINDOW) || 277 DockInfo::LEFT_OF_WINDOW) ||
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 Type type) { 497 Type type) {
498 if (IsCloseToMonitorPoint(screen_loc, x, y, type, &in_enable_area_) && 498 if (IsCloseToMonitorPoint(screen_loc, x, y, type, &in_enable_area_) &&
499 (type != MAXIMIZE || 499 (type != MAXIMIZE ||
500 !IsMaximizedTabbedBrowserOnMonitor(monitor))) { 500 !IsMaximizedTabbedBrowserOnMonitor(monitor))) {
501 hot_spot_.SetPoint(x, y); 501 hot_spot_.SetPoint(x, y);
502 type_ = type; 502 type_ = type;
503 return true; 503 return true;
504 } 504 }
505 return false; 505 return false;
506 } 506 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_window_cocoa.mm ('k') | chrome/browser/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698