| 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 "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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "content/public/browser/session_storage_namespace.h" | 48 #include "content/public/browser/session_storage_namespace.h" |
| 49 #include "content/public/browser/web_contents.h" | 49 #include "content/public/browser/web_contents.h" |
| 50 #include "content/public/browser/web_contents_delegate.h" | 50 #include "content/public/browser/web_contents_delegate.h" |
| 51 #include "content/public/browser/web_contents_view.h" | 51 #include "content/public/browser/web_contents_view.h" |
| 52 #include "net/http/http_util.h" | 52 #include "net/http/http_util.h" |
| 53 #include "ui/base/l10n/l10n_util.h" | 53 #include "ui/base/l10n/l10n_util.h" |
| 54 #include "ui/gfx/codec/png_codec.h" | 54 #include "ui/gfx/codec/png_codec.h" |
| 55 | 55 |
| 56 using content::NavigationController; | 56 using content::NavigationController; |
| 57 using content::NavigationEntry; | 57 using content::NavigationEntry; |
| 58 using content::RenderViewHost; |
| 59 using content::RenderWidgetHost; |
| 58 using content::SessionStorageNamespace; | 60 using content::SessionStorageNamespace; |
| 59 using content::WebContents; | 61 using content::WebContents; |
| 60 | 62 |
| 61 namespace { | 63 namespace { |
| 62 | 64 |
| 63 // Number of ms to delay before updating the omnibox bounds. This is only used | 65 // Number of ms to delay before updating the omnibox bounds. This is only used |
| 64 // when the bounds of the omnibox shrinks. If the bounds grows, we update | 66 // when the bounds of the omnibox shrinks. If the bounds grows, we update |
| 65 // immediately. | 67 // immediately. |
| 66 const int kUpdateBoundsDelayMS = 1000; | 68 const int kUpdateBoundsDelayMS = 1000; |
| 67 | 69 |
| (...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 host->Send(new ChromeViewMsg_SearchBoxResize( | 1129 host->Send(new ChromeViewMsg_SearchBoxResize( |
| 1128 host->GetRoutingID(), GetOmniboxBoundsInTermsOfPreview())); | 1130 host->GetRoutingID(), GetOmniboxBoundsInTermsOfPreview())); |
| 1129 } else { | 1131 } else { |
| 1130 host->Send(new ChromeViewMsg_SearchBoxChange( | 1132 host->Send(new ChromeViewMsg_SearchBoxChange( |
| 1131 host->GetRoutingID(), user_text, verbatim, 0, 0)); | 1133 host->GetRoutingID(), user_text, verbatim, 0, 0)); |
| 1132 } | 1134 } |
| 1133 | 1135 |
| 1134 frame_load_observer_.reset(new FrameLoadObserver( | 1136 frame_load_observer_.reset(new FrameLoadObserver( |
| 1135 this, preview_contents()->web_contents(), user_text, verbatim)); | 1137 this, preview_contents()->web_contents(), user_text, verbatim)); |
| 1136 } | 1138 } |
| OLD | NEW |