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

Side by Side Diff: chrome/browser/instant/instant_loader.cc

Issue 7599029: Grab bag of bugfixes for Lion fullscreen mode. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Remove unneeded include. 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_controller.mm » ('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) 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/instant/instant_loader.h" 5 #include "chrome/browser/instant/instant_loader.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 gfx::Rect intersection(omnibox_bounds_.Intersect(preview_bounds)); 887 gfx::Rect intersection(omnibox_bounds_.Intersect(preview_bounds));
888 888
889 // Translate into window's coordinates. 889 // Translate into window's coordinates.
890 if (!intersection.IsEmpty()) { 890 if (!intersection.IsEmpty()) {
891 intersection.Offset(-preview_bounds.origin().x(), 891 intersection.Offset(-preview_bounds.origin().x(),
892 -preview_bounds.origin().y()); 892 -preview_bounds.origin().y());
893 } 893 }
894 894
895 // In the current Chrome UI, these must always be true so they sanity check 895 // In the current Chrome UI, these must always be true so they sanity check
896 // the above operations. In a future UI, these may be removed or adjusted. 896 // the above operations. In a future UI, these may be removed or adjusted.
897 DCHECK_EQ(0, intersection.y()); 897 // There is no point in sanity-checking |intersection.y()| because the omnibox
sky 2011/08/17 15:43:38 What does y end up as in mac fullscreen mode? Do y
rohitrao (ping after 24h) 2011/08/17 16:02:25 y ends up being a positive number (greater than ze
898 // can be placed anywhere vertically relative to the preview (for example, in
899 // Mac fullscreen mode, the omnibox is entirely enclosed by the preview
900 // bounds).
898 DCHECK_LE(0, intersection.x()); 901 DCHECK_LE(0, intersection.x());
899 DCHECK_LE(0, intersection.width()); 902 DCHECK_LE(0, intersection.width());
900 DCHECK_LE(0, intersection.height()); 903 DCHECK_LE(0, intersection.height());
901 904
902 return intersection; 905 return intersection;
903 } 906 }
904 907
905 void InstantLoader::PageDoesntSupportInstant(bool needs_reload) { 908 void InstantLoader::PageDoesntSupportInstant(bool needs_reload) {
906 frame_load_observer_.reset(NULL); 909 frame_load_observer_.reset(NULL);
907 910
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 CommandLine* cl = CommandLine::ForCurrentProcess(); 1028 CommandLine* cl = CommandLine::ForCurrentProcess();
1026 if (cl->HasSwitch(switches::kInstantURL)) 1029 if (cl->HasSwitch(switches::kInstantURL))
1027 instant_url = GURL(cl->GetSwitchValueASCII(switches::kInstantURL)); 1030 instant_url = GURL(cl->GetSwitchValueASCII(switches::kInstantURL));
1028 preview_contents_->controller().LoadURL(instant_url, GURL(), transition_type); 1031 preview_contents_->controller().LoadURL(instant_url, GURL(), transition_type);
1029 RenderViewHost* host = preview_contents_->render_view_host(); 1032 RenderViewHost* host = preview_contents_->render_view_host();
1030 host->Send(new ViewMsg_SearchBoxChange( 1033 host->Send(new ViewMsg_SearchBoxChange(
1031 host->routing_id(), user_text, verbatim, 0, 0)); 1034 host->routing_id(), user_text, verbatim, 0, 0));
1032 frame_load_observer_.reset(new FrameLoadObserver( 1035 frame_load_observer_.reset(new FrameLoadObserver(
1033 this, preview_contents()->tab_contents(), user_text, verbatim)); 1036 this, preview_contents()->tab_contents(), user_text, verbatim));
1034 } 1037 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698