summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authormaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-15 12:27:03 +0000
committermaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-15 12:27:03 +0000
commit1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf (patch)
treeb78be07dbada3ac0f6d2435558e4a6aaba198ffc /chrome/browser/views
parentea15e98a9353494df754a11fb49f0e4b8c0d4789 (diff)
downloadchromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.zip
chromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.tar.gz
chromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.tar.bz2
Large patch set (159 files total) to cleanup the includes.
- Slightly reduce the size of the generated .lib files ~3%. - Reduce the number of implicit and explicit atl and windows includes. hooray! - Help incremental build by reducing the number of unnecessary included files. - Split some template class in two, one base class for the common code and the specialization that inherits from the base class. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/SConscript1
-rw-r--r--chrome/browser/views/about_chrome_view.cc1
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc7
-rw-r--r--chrome/browser/views/bookmark_bar_view_test.cc1
-rw-r--r--chrome/browser/views/browser_views.vcproj4
-rw-r--r--chrome/browser/views/constrained_window_impl.cc2
-rw-r--r--chrome/browser/views/constrained_window_impl.h9
-rw-r--r--chrome/browser/views/dom_view.cc64
-rw-r--r--chrome/browser/views/dom_view.h51
-rw-r--r--chrome/browser/views/download_item_view.cc12
-rw-r--r--chrome/browser/views/first_run_bubble.cc1
-rw-r--r--chrome/browser/views/frame/browser_view2.cc4
-rw-r--r--chrome/browser/views/html_dialog_view.cc3
-rw-r--r--chrome/browser/views/hung_renderer_view.cc2
-rw-r--r--chrome/browser/views/info_bar_item_view.cc1
-rw-r--r--chrome/browser/views/info_bubble.cc2
-rw-r--r--chrome/browser/views/info_bubble.h11
-rw-r--r--chrome/browser/views/location_bar_view.cc3
-rw-r--r--chrome/browser/views/options/general_page_view.cc1
-rw-r--r--chrome/browser/views/options/language_combobox_model.cc1
-rw-r--r--chrome/browser/views/options/options_page_view.cc2
-rw-r--r--chrome/browser/views/options/options_window_view.cc1
-rw-r--r--chrome/browser/views/restart_message_box.cc1
-rw-r--r--chrome/browser/views/star_toggle.cc4
-rw-r--r--chrome/browser/views/status_bubble.cc1
-rw-r--r--chrome/browser/views/toolbar_view.cc2
26 files changed, 128 insertions, 64 deletions
diff --git a/chrome/browser/views/SConscript b/chrome/browser/views/SConscript
index f494e9b..350b3e0 100644
--- a/chrome/browser/views/SConscript
+++ b/chrome/browser/views/SConscript
@@ -85,6 +85,7 @@ input_files = [
'constrained_window_animation.cc',
'constrained_window_impl.cc',
'delay_view.cc',
+ 'dom_view.cc',
'download_item_view.cc',
'download_shelf_view.cc',
'download_started_animation.cc',
diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc
index e7084cd..c7128e3 100644
--- a/chrome/browser/views/about_chrome_view.cc
+++ b/chrome/browser/views/about_chrome_view.cc
@@ -40,6 +40,7 @@
#include "chrome/browser/standard_layout.h"
#include "chrome/browser/user_metrics.h"
#include "chrome/browser/views/restart_message_box.h"
+#include "chrome/common/l10n_util.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/installer/util/install_util.h"
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index d249d38..3ece239 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -27,10 +27,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <limits>
-
#include "chrome/browser/views/bookmark_bar_view.h"
+#include <limits>
+
#include "base/base_drag_source.h"
#include "base/gfx/skia_utils.h"
#include "chrome/app/theme/theme_resources.h"
@@ -46,6 +46,7 @@
#include "chrome/browser/history/history.h"
#include "chrome/browser/page_navigator.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/tab_contents.h"
#include "chrome/browser/user_metrics.h"
#include "chrome/browser/view_ids.h"
#include "chrome/browser/views/bookmark_editor_view.h"
@@ -66,6 +67,8 @@
#include "chrome/views/chrome_menu.h"
#include "chrome/views/menu_button.h"
#include "chrome/views/tooltip_manager.h"
+#include "chrome/views/view_container.h"
+#include "chrome/views/window.h"
#include "generated_resources.h"
using ChromeViews::BaseButton;
diff --git a/chrome/browser/views/bookmark_bar_view_test.cc b/chrome/browser/views/bookmark_bar_view_test.cc
index a2a84e7..b2f43c0 100644
--- a/chrome/browser/views/bookmark_bar_view_test.cc
+++ b/chrome/browser/views/bookmark_bar_view_test.cc
@@ -39,6 +39,7 @@
#include "chrome/test/ui/view_event_test_base.h"
#include "chrome/views/chrome_menu.h"
#include "chrome/views/text_button.h"
+#include "chrome/views/window.h"
namespace {
diff --git a/chrome/browser/views/browser_views.vcproj b/chrome/browser/views/browser_views.vcproj
index b63141e..1ff0c1d2 100644
--- a/chrome/browser/views/browser_views.vcproj
+++ b/chrome/browser/views/browser_views.vcproj
@@ -402,6 +402,10 @@
>
</File>
<File
+ RelativePath=".\dom_view.cc"
+ >
+ </File>
+ <File
RelativePath=".\dom_view.h"
>
</File>
diff --git a/chrome/browser/views/constrained_window_impl.cc b/chrome/browser/views/constrained_window_impl.cc
index f12a41a..7524debc 100644
--- a/chrome/browser/views/constrained_window_impl.cc
+++ b/chrome/browser/views/constrained_window_impl.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/views/constrained_window_impl.h"
+#include "base/gfx/rect.h"
#include "chrome/app/chrome_dll_resource.h"
#include "chrome/app/theme/theme_resources.h"
#include "chrome/browser/tab_contents.h"
@@ -49,6 +50,7 @@
#include "chrome/common/pref_service.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/common/win_util.h"
+#include "chrome/views/client_view.h"
#include "chrome/views/button.h"
#include "chrome/views/focus_manager.h"
#include "chrome/views/hwnd_view.h"
diff --git a/chrome/browser/views/constrained_window_impl.h b/chrome/browser/views/constrained_window_impl.h
index 7ccd067..5a37e10 100644
--- a/chrome/browser/views/constrained_window_impl.h
+++ b/chrome/browser/views/constrained_window_impl.h
@@ -27,9 +27,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H__
-#define CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H__
+#ifndef CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H_
+#define CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H_
+#include "base/gfx/rect.h"
#include "chrome/browser/constrained_window.h"
#include "chrome/browser/tab_contents_delegate.h"
#include "chrome/views/custom_frame_window.h"
@@ -221,7 +222,7 @@ class ConstrainedWindowImpl : public ConstrainedWindow,
// Current display rectangle (relative to owner_'s visible area).
gfx::Rect current_bounds_;
- DISALLOW_EVIL_CONSTRUCTORS(ConstrainedWindowImpl);
+ DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowImpl);
};
-#endif // #ifndef CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H__
+#endif // #ifndef CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H_
diff --git a/chrome/browser/views/dom_view.cc b/chrome/browser/views/dom_view.cc
new file mode 100644
index 0000000..d0473a9
--- /dev/null
+++ b/chrome/browser/views/dom_view.cc
@@ -0,0 +1,64 @@
+// Copyright 2008, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include "chrome/browser/views/dom_view.h"
+
+#include "chrome/browser/dom_ui/dom_ui_host.h"
+
+DOMView::DOMView(const GURL& contents)
+ : contents_(contents), initialized_(false), host_(NULL) {
+}
+
+DOMView::~DOMView() {
+ if (host_) {
+ Detach();
+ host_->Destroy();
+ host_ = NULL;
+ }
+}
+
+bool DOMView::Init(Profile* profile, SiteInstance* instance) {
+ if (initialized_)
+ return true;
+ initialized_ = true;
+
+ // TODO(timsteele): This should use a separate factory method; e.g
+ // a DOMUIHostFactory rather than TabContentsFactory, because DOMView's
+ // should only be associated with instances of DOMUIHost.
+ TabContentsType type = TabContents::TypeForURL(&contents_);
+ TabContents* tab_contents = TabContents::CreateWithType(type,
+ GetViewContainer()->GetHWND(), profile, instance);
+ host_ = tab_contents->AsDOMUIHost();
+ DCHECK(host_);
+
+ ChromeViews::HWNDView::Attach(host_->GetContainerHWND());
+ host_->SetupController(profile);
+ host_->controller()->LoadURL(contents_, PageTransition::START_PAGE);
+ return true;
+}
diff --git a/chrome/browser/views/dom_view.h b/chrome/browser/views/dom_view.h
index 07a5f71..d55914d 100644
--- a/chrome/browser/views/dom_view.h
+++ b/chrome/browser/views/dom_view.h
@@ -30,53 +30,27 @@
// DOMView is a ChromeView that displays the content of a web DOM.
// It should be used with data: URLs.
-#ifndef CHROME_BROWSER_VIEWS_DOM_VIEW_H__
-#define CHROME_BROWSER_VIEWS_DOM_VIEW_H__
+#ifndef CHROME_BROWSER_VIEWS_DOM_VIEW_H_
+#define CHROME_BROWSER_VIEWS_DOM_VIEW_H_
-#include "base/basictypes.h"
-#include "base/scoped_ptr.h"
-#include "base/string_util.h"
-#include "chrome/browser/render_process_host.h"
-#include "chrome/browser/dom_ui/dom_ui_host.h"
#include "chrome/views/hwnd_view.h"
+#include "googleurl/src/gurl.h"
+
+class DOMUIHost;
+class Profile;
+class SiteInstance;
class DOMView : public ChromeViews::HWNDView {
public:
// Construct a DOMView to display the given data: URL.
- explicit DOMView(const GURL& contents)
- : contents_(contents), initialized_(false), host_(NULL) {}
-
- virtual ~DOMView() {
- if (host_) {
- Detach();
- host_->Destroy();
- host_ = NULL;
- }
- }
+ explicit DOMView(const GURL& contents);
+ virtual ~DOMView();
// Initialize the view, causing it to load its contents. This should be
// called once the view has been added to a container.
// If |instance| is not null, then the view will be loaded in the same
// process as the given instance.
- bool Init(Profile* profile, SiteInstance* instance) {
- if (initialized_)
- return true;
- initialized_ = true;
-
- // TODO(timsteele): This should use a separate factory method; e.g
- // a DOMUIHostFactory rather than TabContentsFactory, because DOMView's
- // should only be associated with instances of DOMUIHost.
- TabContentsType type = TabContents::TypeForURL(&contents_);
- TabContents* tab_contents = TabContents::CreateWithType(type,
- GetViewContainer()->GetHWND(), profile, instance);
- host_ = tab_contents->AsDOMUIHost();
- DCHECK(host_);
-
- ChromeViews::HWNDView::Attach(host_->GetContainerHWND());
- host_->SetupController(profile);
- host_->controller()->LoadURL(contents_, PageTransition::START_PAGE);
- return true;
- }
+ bool Init(Profile* profile, SiteInstance* instance);
protected:
DOMUIHost* host_;
@@ -85,8 +59,7 @@ class DOMView : public ChromeViews::HWNDView {
GURL contents_;
bool initialized_;
- DISALLOW_EVIL_CONSTRUCTORS(DOMView);
+ DISALLOW_COPY_AND_ASSIGN(DOMView);
};
-#endif // CHROME_BROWSER_VIEWS_DOM_VIEW_H__
-
+#endif // CHROME_BROWSER_VIEWS_DOM_VIEW_H_
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc
index 4cd218d..b9612b1 100644
--- a/chrome/browser/views/download_item_view.cc
+++ b/chrome/browser/views/download_item_view.cc
@@ -27,23 +27,20 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <vector>
-
#include "chrome/browser/views/download_item_view.h"
-#include "base/message_loop.h"
-#include "base/task.h"
-#include "base/timer.h"
+#include <vector>
+
#include "chrome/app/theme/theme_resources.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download_util.h"
#include "chrome/browser/views/download_shelf_view.h"
#include "chrome/common/gfx/chrome_canvas.h"
-#include "chrome/common/l10n_util.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/common/win_util.h"
#include "chrome/views/root_view.h"
#include "chrome/views/view_container.h"
+
#include "generated_resources.h"
// TODO(paulg): These may need to be adjusted when download progress
@@ -466,7 +463,7 @@ bool DownloadItemView::OnMousePressed(const ChromeViews::MouseEvent& event) {
complete_animation_->End();
if (event.IsOnlyLeftMouseButton()) {
- CPoint point(event.GetLocation());
+ WTL::CPoint point(event.GetX(), event.GetY());
if (event.GetX() < drop_down_x_) {
SetState(PUSHED, NORMAL);
return true;
@@ -530,7 +527,6 @@ void DownloadItemView::OnMouseReleased(const ChromeViews::MouseEvent& event,
starting_drag_ = false;
return;
}
- CPoint point(event.GetLocation());
if (event.IsOnlyLeftMouseButton() && event.GetX() < drop_down_x_)
OpenDownload();
diff --git a/chrome/browser/views/first_run_bubble.cc b/chrome/browser/views/first_run_bubble.cc
index f17071c..b880abf 100644
--- a/chrome/browser/views/first_run_bubble.cc
+++ b/chrome/browser/views/first_run_bubble.cc
@@ -41,6 +41,7 @@
#include "chrome/views/event.h"
#include "chrome/views/label.h"
#include "chrome/views/native_button.h"
+#include "chrome/views/window.h"
#include "generated_resources.h"
diff --git a/chrome/browser/views/frame/browser_view2.cc b/chrome/browser/views/frame/browser_view2.cc
index 40d5a50..5db1c58 100644
--- a/chrome/browser/views/frame/browser_view2.cc
+++ b/chrome/browser/views/frame/browser_view2.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/views/frame/browser_view2.h"
+#include "chrome/app/chrome_dll_resource.h"
#include "chrome/app/theme/theme_resources.h"
#include "chrome/browser/app_modal_dialog_queue.h"
#include "chrome/browser/browser.h"
@@ -41,10 +42,13 @@
#include "chrome/browser/views/frame/browser_frame.h"
#include "chrome/browser/views/status_bubble.h"
#include "chrome/browser/views/toolbar_view.h"
+#include "chrome/common/drag_drop_types.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/os_exchange_data.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/resource_bundle.h"
+#include "chrome/views/view.h"
+#include "chrome/views/window.h"
#include "generated_resources.h"
// static
diff --git a/chrome/browser/views/html_dialog_view.cc b/chrome/browser/views/html_dialog_view.cc
index cdf48e8..890d5a4 100644
--- a/chrome/browser/views/html_dialog_view.cc
+++ b/chrome/browser/views/html_dialog_view.cc
@@ -27,9 +27,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "chrome/browser/browser.h"
#include "chrome/browser/views/html_dialog_view.h"
+#include "chrome/browser/browser.h"
+#include "chrome/views/root_view.h"
#include "chrome/views/window.h"
////////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/views/hung_renderer_view.cc b/chrome/browser/views/hung_renderer_view.cc
index b121b00..80f8b03 100644
--- a/chrome/browser/views/hung_renderer_view.cc
+++ b/chrome/browser/views/hung_renderer_view.cc
@@ -34,7 +34,7 @@
#include "chrome/browser/browser_list.h"
#include "chrome/browser/render_view_host.h"
#include "chrome/browser/standard_layout.h"
-#include "chrome/browser/tab_contents.h"
+#include "chrome/browser/web_contents.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/gfx/chrome_canvas.h"
#include "chrome/common/gfx/path.h"
diff --git a/chrome/browser/views/info_bar_item_view.cc b/chrome/browser/views/info_bar_item_view.cc
index 99740f7..6fc6242 100644
--- a/chrome/browser/views/info_bar_item_view.cc
+++ b/chrome/browser/views/info_bar_item_view.cc
@@ -35,6 +35,7 @@
#include "chrome/views/external_focus_tracker.h"
#include "chrome/views/image_view.h"
#include "chrome/views/root_view.h"
+#include "chrome/views/view_container.h"
#include "generated_resources.h"
diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc
index a9671f6..b087451b 100644
--- a/chrome/browser/views/info_bubble.cc
+++ b/chrome/browser/views/info_bubble.cc
@@ -37,7 +37,7 @@
#include "chrome/common/gfx/path.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/common/win_util.h"
-#include "chrome/views/focus_manager.h"
+#include "chrome/views/root_view.h"
using ChromeViews::View;
diff --git a/chrome/browser/views/info_bubble.h b/chrome/browser/views/info_bubble.h
index adb46c7..1fa01d9 100644
--- a/chrome/browser/views/info_bubble.h
+++ b/chrome/browser/views/info_bubble.h
@@ -27,11 +27,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef CHROME_BROWSER_VIEWS_INFO_BUBBLE_H__
-#define CHROME_BROWSER_VIEWS_INFO_BUBBLE_H__
+#ifndef CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_
+#define CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_
#include "chrome/common/slide_animation.h"
#include "chrome/views/hwnd_view_container.h"
+#include "chrome/views/view.h"
// InfoBubble is used to display an arbitrary view above all other windows.
// Think of InfoBubble as a tooltip that allows you to embed an arbitrary view
@@ -167,7 +168,7 @@ class InfoBubble : public ChromeViews::HWNDViewContainer,
// The bubble we're in.
InfoBubble* host_;
- DISALLOW_EVIL_CONSTRUCTORS(ContentView);
+ DISALLOW_COPY_AND_ASSIGN(ContentView);
};
// Creates and return a new ContentView containing content.
@@ -186,7 +187,7 @@ class InfoBubble : public ChromeViews::HWNDViewContainer,
// The fade-in animation.
scoped_ptr<SlideAnimation> fade_animation_;
- DISALLOW_EVIL_CONSTRUCTORS(InfoBubble);
+ DISALLOW_COPY_AND_ASSIGN(InfoBubble);
};
-#endif // CHROME_BROWSER_VIEWS_INFO_BUBBLE_H__
+#endif // CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index ad2a7b5..f354ef4 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -52,6 +52,7 @@
#include "chrome/common/win_util.h"
#include "chrome/views/background.h"
#include "chrome/views/border.h"
+#include "chrome/views/root_view.h"
#include "chrome/views/view_container.h"
#include "googleurl/src/gurl.h"
#include "googleurl/src/url_canon.h"
@@ -603,7 +604,7 @@ void LocationBarView::OnMouseEvent(const ChromeViews::MouseEvent& event,
if (event.IsRightMouseButton())
flags |= MK_RBUTTON;
- CPoint screen_point(event.GetLocation());
+ CPoint screen_point(event.GetX(), event.GetY());
ConvertPointToScreen(this, &screen_point);
location_entry_->HandleExternalMsg(msg, flags, screen_point);
diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc
index 2902ff1..58991e9 100644
--- a/chrome/browser/views/options/general_page_view.cc
+++ b/chrome/browser/views/options/general_page_view.cc
@@ -51,6 +51,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/pref_service.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/views/checkbox.h"
#include "chrome/views/grid_layout.h"
diff --git a/chrome/browser/views/options/language_combobox_model.cc b/chrome/browser/views/options/language_combobox_model.cc
index 29a6659..a2da0c3 100644
--- a/chrome/browser/views/options/language_combobox_model.cc
+++ b/chrome/browser/views/options/language_combobox_model.cc
@@ -32,6 +32,7 @@
#include "base/string_util.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/user_metrics.h"
+#include "chrome/common/l10n_util.h"
#include "chrome/common/pref_service.h"
#include "unicode/uloc.h"
diff --git a/chrome/browser/views/options/options_page_view.cc b/chrome/browser/views/options/options_page_view.cc
index b659249..93ed694 100644
--- a/chrome/browser/views/options/options_page_view.cc
+++ b/chrome/browser/views/options/options_page_view.cc
@@ -28,9 +28,11 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "chrome/browser/views/options/options_page_view.h"
+
#include "chrome/browser/browser_process.h"
#include "chrome/browser/user_metrics.h"
#include "chrome/common/pref_service.h"
+#include "chrome/views/view_container.h"
///////////////////////////////////////////////////////////////////////////////
// OptionsPageView
diff --git a/chrome/browser/views/options/options_window_view.cc b/chrome/browser/views/options/options_window_view.cc
index 5b29fdb..904e54e 100644
--- a/chrome/browser/views/options/options_window_view.cc
+++ b/chrome/browser/views/options/options_window_view.cc
@@ -42,6 +42,7 @@
#include "chrome/common/resource_bundle.h"
#include "chrome/views/dialog_delegate.h"
#include "chrome/views/tabbed_pane.h"
+#include "chrome/views/root_view.h"
#include "chrome/views/window.h"
#include "generated_resources.h"
diff --git a/chrome/browser/views/restart_message_box.cc b/chrome/browser/views/restart_message_box.cc
index d3f52cd..757ad52 100644
--- a/chrome/browser/views/restart_message_box.cc
+++ b/chrome/browser/views/restart_message_box.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/views/restart_message_box.h"
+#include "chrome/common/l10n_util.h"
#include "chrome/views/message_box_view.h"
#include "chrome/views/window.h"
diff --git a/chrome/browser/views/star_toggle.cc b/chrome/browser/views/star_toggle.cc
index e480c40..4387998 100644
--- a/chrome/browser/views/star_toggle.cc
+++ b/chrome/browser/views/star_toggle.cc
@@ -75,7 +75,7 @@ bool StarToggle::OnMouseDragged(const ChromeViews::MouseEvent& e) {
}
bool StarToggle::OnMousePressed(const ChromeViews::MouseEvent& e) {
- if (e.IsLeftMouseButton() && HitTest(e.GetLocation())) {
+ if (e.IsLeftMouseButton() && HitTest(WTL::CPoint(e.GetX(), e.GetY()))) {
RequestFocus();
return true;
}
@@ -84,7 +84,7 @@ bool StarToggle::OnMousePressed(const ChromeViews::MouseEvent& e) {
void StarToggle::OnMouseReleased(const ChromeViews::MouseEvent& e,
bool canceled) {
- if (e.IsLeftMouseButton() && HitTest(e.GetLocation()))
+ if (e.IsLeftMouseButton() && HitTest(WTL::CPoint(e.GetX(), e.GetY())))
SwitchState();
}
diff --git a/chrome/browser/views/status_bubble.cc b/chrome/browser/views/status_bubble.cc
index 04b44f3..a9e76a7 100644
--- a/chrome/browser/views/status_bubble.cc
+++ b/chrome/browser/views/status_bubble.cc
@@ -41,6 +41,7 @@
#include "chrome/common/resource_bundle.h"
#include "chrome/views/hwnd_view_container.h"
#include "chrome/views/label.h"
+#include "chrome/views/root_view.h"
#include "chrome/views/view_container.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc
index 476318d..c9cbc43 100644
--- a/chrome/browser/views/toolbar_view.cc
+++ b/chrome/browser/views/toolbar_view.cc
@@ -50,10 +50,12 @@
#include "chrome/browser/views/toolbar_star_toggle.h"
#include "chrome/browser/view_ids.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/drag_drop_types.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/os_exchange_data.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/pref_service.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/views/button_dropdown.h"
#include "chrome/views/hwnd_view.h"